Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
9([\s]*)(\d[\s]*){9}
/
gm

Description

An invoice number always has 10 digits, starting with a '9' (e.g. '9400065741'). But a number should also be found if it contains white-spaces.

These numbers should also be found: '9400065741' ' 94 00065741' '9 40 0065 741' '9400065 741' '94 00 06 57 41 '

Submitted by anonymous - 5 years ago