The following works on my php instance. It's a
posix-standard regex, so it should work with any regex
package that's posix standards compliant.

AC

^([(]?\d{3}[-)]\d{3}-\d{4})*$
--- [EMAIL PROTECTED] wrote:
> 
> Hello!
> 
> I'm having trouble building a regexp pattern for a
> US telephone number.
> The following formats need to be valid:
> 
> <blank>
> xxx-xxx-xxxx
> (xxx)xxx-xxxx
> 
> 
> So, I need a blank and two number formats to be
> valid formats.  What's the
> regexp format that could accomplish this?
> 
> Thank you very much!!
> 
> -Ryan
> 
> 
> 
> 
> 
>
==============================================================================
> This communication, together with any attachments
> hereto or links contained herein, is for the sole
> use of the intended recipient(s) and may contain
> information that is confidential or legally
> protected. If you are not the intended recipient,
> you are hereby notified that any review, disclosure,
> copying, dissemination, distribution or use of this
> communication is STRICTLY PROHIBITED.  If you have
> received this communication in error, please notify
> the sender immediately by return e-mail message and
> delete the original and all copies of the
> communication, along with any attachments hereto or
> links herein, from your system.
>
==============================================================================
> The St. Paul Travelers e-mail system <tdmmsws2> made
> this annotation on 05/11/2004 04:17:55 PM.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


        
                
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to