Re: Regex error

From: Date: Thu, 15 Mar 2007 00:31:31 +0000
Subject: Re: Regex error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-250621@lists.php.net to get a copy of this message
Get The Regex Coach http://weitz.de/regex-coach/ Use preg_match_all() Build your pattern one step at a time using the coach. Don't forget the delimiters. jekillen wrote:
Hello; The following regex: ereg("<member value='[a-zA-Z ]{1,25}' uspace='([a-z0-9-\.\/]{2,11})' id='$m[1]'>", $groups, $m1); is causing the following error: Warning: ereg() [function.ereg]: REG_ERANGE in <path info>_proc.php on line 81 Can someone tell me what this means? What I am trying to do is pick out some info from an xml tag the is id'd by $m[1] ( a match from a preceding regex. This regex is only supposed to be applied if there is an $m[1] match. This happened without the dot (.) and forward slash escaped in the uspace=' etc ' section. I used back slashes to see if that made a difference, it does not. I have gotten a little hazy on what needs to be escaped in character classes. I have written a number of similar regexs in the same collections of scripts and I can not see what this one is complaining about. php v5.1.2, Apache 1.3.34, FreeBSD v6.0 Thanks in advance Jeff K


« previous php.general (#250621) next »