Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(?:[+]6)?0(([0-9]{2}((\s[0-9]{3,4}\s[0-9]{4})|(-[0-9]{3,4}\s[0-9]{4})|(-[0-9]{7,8})))|([0-9]{9,10}))$
/
gm

Description

A regular expression of Malaysian phone number I made to be used on a project using flutter.

Submitted by anonymous - 2 years ago