RE: [PHP] Regular Expression Problem

From: Date: Fri, 22 Mar 2002 14:31:27 +0000
Subject: RE: [PHP] Regular Expression Problem
Groups: php.general 
Request: Send a blank email to php-general+get-89688@lists.php.net to get a copy of this message
__([a-z0-9][a-z0-9_]+)__ -----Original Message----- From: Sharat Hegde [mailto:sharat_hegde@hotmail.com] Sent: Friday, March 22, 2002 4:22 AM To: php-general@lists.php.net Subject: [PHP] Regular Expression Problem 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#89688) next »