Regular Expressions 101

  • PCRE2 (PHP)
  • Match
0

Regular Expression

/
((?<=is).[0-9]{4,8}.(?=is)?)|(^[0-9]{4,8}.(?= is))
/
gm

Description

Covers most of the cases of getting otp from email or mobile number

Submitted by Anonymous