Regular Expressions 101

Community Patterns

9

UUID

ECMAScript (JavaScript)
no description available
Submitted by anonymous - 9 years ago

Comprehensive PO Box detection (with generator code in Javascript)

1

Regular Expression
ECMAScript (JavaScript)

/
\b(((?:(P(?:ost(?:al)?)?)[ ./\-_]*(O(?:ff(?:ice)?)?)?[ ./\-_]*(b(?:o?x|in)?))|(?:(P(?:ost(?:al)?)?)[ ./\-_]*(O(?:ff(?:ice)?)?)[ ./\-_]*(b(?:o?x|in)?)?)|(?:(?<!(r(?:ural)?[ ./\-_]*r(?:oute)?)[ ./\-_]*((n\.?(?:o|um(?:ber)?)?\.?)?[ ./\-_]*#*[ ./\-_]*(\d+))?[ ./\-_]*)(box|bin)))[ ./\-_]*((n\.?(?:o|um(?:ber)?)?\.?)?[ ./\-_]*#*[ ./\-_]*(\d+)))\b
/
gmi

Description

Loading markdown...
Submitted by TheSecurityDev - 7 months ago
(Last modified 7 months ago)