|
Posted by William Park on 08/06/05 03:13
In <comp.unix.shell> marcy klein <no_email@noemail.com> wrote:
> Hi. I'm trying to create a regular expression for a form field validation
> that would permit input something like this:
>
> +1 (1-23) 321.1234 ext.12
>
> Any numbers 0-9, plus signs, parentheses (open and close), periods (dots),
> hyphens, alpha characters e, x, and t, and blank spaces.
>
> I have thus far been working with:
>
> ^[0-9ext\(\)\+\.\-]*$
>
> Hmm, I should make the alpha characters case insensitive as well. But the
> problem I'm having is including blank spaces.
^[ 0-9ext()+.-]*$
> As you can see from the
> example input string above, there are blank spaces in the string. Thus far,
> however, I've not been able to construct my regular expression to permit
> blank spaces. Any suggestions or help would be appreciated. TIA (Running
> Mandrake Linux, BASH, PHP.)
>
> Marcy
--
William Park <opengeometry@yahoo.ca>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
http://freshmeat.net/projects/bashdiff/
Navigation:
[Reply to this message]
|