regex question...

From: Date: Mon, 02 Oct 2000 19:09:19 +0000
Subject: regex question...
Groups: php.general 
Request: Send a blank email to php-general+get-18296@lists.php.net to get a copy of this message
hi, i have a quick regex question. i have a rather large string which looks like: $str = " : : <!--BeginCode--> hello world! <!--EndCode--> : : "; i would like to write a function that would replace the hello world part... so far, i have come up with: $pattern = "<!--BeginCode-->[^\\]*<!--EndCode-->"; $newStr = ereg_replace ($pattern, "how you doing?" $str); the problem with this is that i cannot have the \ sign in my string... so i was wondering if i could have something that's equivalent to [[:any_character_digits_symbols:]]... i tried [^\0] but that didn't work. :P thanx in advance for any help! :) ---------------- remco chang bountyquest.com

« previous php.general (#18296) next »