RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(^(p[\s|\.|,]*| ^post[\s|\.]*)(o[\s|\.|,]*| office[\s|\.]*))| (^box[.|\s]*\d+)
Description
This expression filters all variations of Post Office Box or PO Box.
Matches
PO Box | p.o. box | box 123
Non-Matches
123 Some Street
Author Rating: Not yet rated. Joseph Lamb
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Not working
Name: AC
Date: 7/13/2007 9:53:11 AM
Comment:
Try it on Portland Street s.1233


Title: Not working
Name: AC
Date: 7/12/2007 5:13:01 PM
Comment:
Try it on Portland Street s.1233


Title: How to flop the match?
Name: Ron
Date: 6/28/2005 4:49:33 PM
Comment:
Sorry... regex newbie here... how do I flop the match so *PO Box* is a non-match? I tried ^ in front and other spots, but couldn't get it to work. Thanks!


Title: Excellent.
Name: Chris
Date: 11/18/2004 4:25:17 PM
Comment:
Excellent work my friend. To the other commenter (case insensitivity)


Title: Works if you ToLower()
Name: DissidenceTSB
Date: 7/16/2004 11:59:04 AM
Comment:
I dont' know if it's mentioned anywhere, but you have to ToLower() your input string in order for this to work.


Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials