Regular Expression Problem

From: Date: Fri, 22 Mar 2002 10:21:38 +0000
Subject: Regular Expression Problem
Groups: php.general 
Request: Send a blank email to php-general+get-89657@lists.php.net to get a copy of this message
Hello, In PHP3, I am using code which using the regular expression capability of PHP. The code matches all occurences of string prefixed by __ (2 underscores) and having alphanumeric characters as well as _ (1 underscore) within it. The code is as follows: while (eregi("__([a-z0-9_]+)__", $ExpandedString, $Matches)) { .... } In PHP 4, the regular expression "__([a-z0-9_]+)__" does not seem to work. I tried "__([[:alnum:]_]+)__" also but that too did not work. Looks like the problem is with combining two ranges and a literal within the regular expression.... Any solution would be appreciated? With Regards, Sharat _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com

« previous php.general (#89657) next »