niju wrote:
> Hi
> I have a text box which takes either 8 or 10 digit number. I am using
> a regular expression valuator to validate the text box. I also want
> to be able to remove any white space from the text box. Is there a
> way to do this with in the regular expression valuator? Any help
> would be greatly appreciated.
>
> Here is my Regex : (02)?[4,8,9]{1}[0-9]{3}[0-9]{4}
>
> for example (99 99 9999) should be (99999999) and validated against
> (02)?[4,8,9]{1}[0-9]{3}[0-9]{4}
>
>
> many Thanks
> niju
to test RE's, look for programs as "The Regulator" and "The Regex Coach"
If the spaces are at expected places, you can extend your RE:
(02)?[4,8,9]{1}[ ]?[0-9]{3}[ ]?[0-9]{4}
Hans Kesting
|