Reg expression for 0400 000 000 thanks

Reg expression for 0400 000 000 thanks

am 24.01.2008 02:49:42 von naijacoder

Where can i get the reg exp for a number like
0400 000 000 i want it to validate this pattern and make sure there are
spaces and its numeric
Thanks in adance

Re: Reg expression for 0400 000 000 thanks

am 24.01.2008 04:13:10 von Hal Rosser

"rote" wrote in message
news:eZHCltiXIHA.4448@TK2MSFTNGP03.phx.gbl...
> Where can i get the reg exp for a number like
> 0400 000 000 i want it to validate this pattern and make sure there are
> spaces and its numeric
> Thanks in adance
>

Take a look at the Pattern class
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Patt ern.html

Re: Reg expression for 0400 000 000 thanks

am 24.01.2008 05:06:48 von naijacoder

Thanks Hal but thats not what i was asking for.

"Hal Rosser" wrote in message
news:ZmTlj.5634$1f.1974@bignews9.bellsouth.net...
>
> "rote" wrote in message
> news:eZHCltiXIHA.4448@TK2MSFTNGP03.phx.gbl...
>> Where can i get the reg exp for a number like
>> 0400 000 000 i want it to validate this pattern and make sure there are
>> spaces and its numeric
>> Thanks in adance
>>
>
> Take a look at the Pattern class
> http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Patt ern.html
>
>

Re: Reg expression for 0400 000 000 thanks

am 24.01.2008 09:27:27 von mark

"rote" wrote in message
news:eZHCltiXIHA.4448@TK2MSFTNGP03.phx.gbl...

> Where can I get the reg exp for a number like
> 0400 000 000? I want it to validate this pattern and make sure there are
> spaces and it's numeric

"\d{4} \d{3} \d{3}"

http://msdn2.microsoft.com/en-us/library/1400241x.aspx


--
Mark Rae
ASP.NET MVP
http://www.markrae.net