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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details PO Box
Expression
\b[P|p]?(OST|ost)?\.?\s*[O|o|0]?(ffice|FFICE)?\.?\s*[B|b][O|o|0]?[X|x]?\.?\s+[#]?(\d+)\b
Description
Modified version of Chris Myers' regexp for po boxes. This one won't match the word "box" in the address. Only matches if there is a number following the po box. Also accepts a # in front of the number and other spelling variations.
Matches
po box 123, p.o.b. #123, box 123
Non-Matches
123 box canyon rd
Author Rating: The rating for this expression. greg croasdill
   Displaying page 1 of 1 pages; Items 1 to 1

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