Regular expressions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Php docs are quite messy about what works with what function...
This is my problem; I want to strip out spaces from my tags:

$word = "[ / quote ]";
$word = eregi_replace("[[[:blank:]]*quote[[:blank:]]*]", "[quote]", $word);
$word = eregi_replace("[[[:blank:]]*\/[[:blank:]]*quote[[:blank:]]*]",
"[/quote]", $word);

I would expect the result to be: [/quote] but it is [ /[quote].
It seems the first replace actually do the replace, but the how does it
match the slash "/" ???

Thanks,
Camillo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux