Regular expressions

From: Date: Tue, 12 Apr 2005 10:30:37 +0000
Subject: Regular expressions
Groups: php.general 
Request: Send a blank email to php-general+get-212898@lists.php.net to get a copy of this message
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

« previous php.general (#212898) next »