Reply to preg_replace question

Your name:

Reply:


Posted by julianmlp on 06/06/06 23:48

I'm fairly new to regex code, and I'm trying to find a way to replace
any text after "///" (three slashes) and before a "\n" character.


I've tried with:

$filen = preg_replace("///./\n$", "", $filen);
The pattern would mean:
"string that has three "/" followed by any characters and which ends
with \n"


$filen = preg_replace("//{2}.\n$", "", $filen);
The pattern would mean:
"string that has one "/" followed two "/", then followed by any
character and which ends with \n"


What's wrong with these patterns?

regards - julian

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация