Re: Ereg sass
| From: | Ernest E Vogelsinger | Date: | Tue, 18 Mar 2003 10:16:40 +0000 |
| Subject: | Re: Ereg sass | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140097@lists.php.net to get a copy of this message | ||
At 10:36 18.03.2003, Jason k Larson said:
--------------------[snip]--------------------
>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 \.
--------------------[snip]--------------------
The period is a regex placeholder for "any character". Thus it will match a
period, but also a #, a @, and everything that's not allowed in the planned
regex.
By escaping the period you're changing the meaning from "any character" to
"or a period" (in this context) so I believe that's what you want to do.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/