note 97796 deleted from function.preg-match by danbrown
| From: | danbrown@php.net | Date: | Sun, 09 May 2010 03:07:58 +0000 |
| Subject: | note 97796 deleted from function.preg-match by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169082@lists.php.net to get a copy of this message | ||
Note Submitter: Max-Max
----
There is one case I can't figure out how to solve.
Look at this expression:
^[^.][a-z]+[^.]$
It says that the first AND last position shall not be a . character and in between the first and
last there can be any number of a-z.
But this requires minimum 3 characters to pass. What I want is that first and last position must be
0 or 1 character not containing the . character. This makes it possible to let only one character of
a-z to pass.
Any clues of how to do this?
Regards...