Re: Ereg sass
| From: | Jason k Larson | Date: | Tue, 18 Mar 2003 09:36:38 +0000 |
| Subject: | Re: Ereg sass | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140089@lists.php.net to get a copy of this message | ||
It's seeing the - as a range identifier, escape it to get the literal hyphen.
How about this:
[a-zA-Z0-9_\-.]*
In my tests, the period didn't need to be escaped with the \.
HTH,
Jason k Larson
Liam Gibbs wrote:
I'm not sure why, but I can't include a period in my eregi statement: [A-Za-z0-9_-.]* For this, I get Warning: ereg() [function.ereg]: REG_ERANGE in /home/website/public_html/Functions.inc on line 27 The same goes for [A-Za-z0-9_-\.]* Anyone know why?