|
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
Navigation:
[Reply to this message]
|