Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
((NUP?\s?\d{3,5}(\W?(E(C[AJKLMP]{1,2})?|M[AL\d]?))?(\W+(C\d|TVP\d|M\d|P\d{2}))?((\-|\+|\/)(C\d|H\s?\d{3,4}|R\d{3}))?)|(2\d{3,5}((\s|\-)?(CA?C?(K(JA|\d{2})?|N2|JA)?|MB|TN\d|E\d?([A๋CJKMWX]{1,2})?(TN9|D1)?|2RS|TVH?|SK?|KM?|M|TN))?((\/|\+|\-|\.)?(C\d8?(W\d{2,3})?|HA?\s?(\d{3,4}X?|\dC\dW\d{2})|2RS1K?TN9|TVH?|K(D1)?|M|W+\d{2,3}|VA\s?\d{3}))?((\-|\.|\s|\+)?(C\d|([AO]{1,2})?HX?\s?\d{3,5}\s?[GHX]?|VA\s?\d{3}))?)|(S[NLO]{2,3}(\s?\d{3,4}(\-\d{3})?(\s?TA)?)(\W*((2X)?FRB\s?\d{1,2}\/\d{2,3}|2\d{3,4}(EK)?(\/C\d)?|(2X)?TS[ON]\s?\d{3}C?))?(\W*(TSO?\s?\d{2,3}(\/\d{3})?|H\d{3}|FRB\s?\d{1,2}\/\d{3}|[LND]{1,2}))?(\W*(2X)?TSN\s?\d{3}(\s?(C|ND|L))?)?)|([AO]?[HO][AEHX]?\s?\d{3,5}(\s?[BEGH])?)|(CUKF\d{3}C?(\W*H\s?\d{3,4})?)|(PDN\s?\d{3}(\W*(2X)?\d{3,4}(\/C\d)?)?)|(7\d{3,4}((\s|\-)?(CDGA|BG?([A-GJMNPY]{2,4})?(\dGAP)?(L\dG)?|ACD|UCG))?(\-XL)?((\/|\-)(P\dA|GNP\d|TVP|MP)(\-UA)?)?)|([CFKLPSUX]{1,3}\-?\d{2,4}((\+|\-)?(H\d{3,4}|(\d{3}|L)?D\dN?|\d{2}|C\dHR[S5])?))|(B[458])|((AS+|SER)\d{3}N?)|((NU)?KR([EV]{1,2})?\s?\d{2}(\s?(P+X?A|B|A))?)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