Posted by Ewoud Dronkert on 11/11/47 11:30
lkrubner@geocities.com wrote:
> how do you say "not" in regex? Is it "^"?
Yes and no. http://php.net/manual/en/reference.pcre.pattern.syntax.php
> I've decided that all I want to do is make sure there are no letters in
> the input. Is it right to say this:
>
> $pattern "[^A-Za-z]";
That is not a pattern because it doesn't have pattern delimiters. It also
doesn't have any quantifiers (+, * or {}), or start- or end-of-subject
pinning (^ and $). And you can use a pattern modifier for case-insensitive
matching, see
http://php.net/manual/en/reference.pcre.pattern.modifiers.php
--
E. Dronkert
Navigation:
[Reply to this message]
|