Re: Regex error
| From: | Myron Turner | Date: | Thu, 15 Mar 2007 01:10:14 +0000 |
| Subject: | Re: Regex error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-250622@lists.php.net to get a copy of this message | ||
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 KWhat is this part of the regex supposed to be doing: [a-z0-9-\.\/] ? Your problem is this: 0-9-, which causes a bad range error. -- _____________________ Myron Turner http://www.room535.org http://www.bstatzero.org http://www.mturner.org/XML_PullParser/