Skip to content

Instantly share code, notes, and snippets.

@liongkj
Created July 25, 2020 06:59
Show Gist options
  • Select an option

  • Save liongkj/d852a05b0459aeb6349e5dbf40b94be9 to your computer and use it in GitHub Desktop.

Select an option

Save liongkj/d852a05b0459aeb6349e5dbf40b94be9 to your computer and use it in GitHub Desktop.
Malaysia Phone number Regex without country code
^(?!61)(6?[60]?1{1})[0|1|2|3|4|6|7|8|9]\-*[0-9]{7,8}$
matched
0123456789
60123456789
123456789
@liongkj
Copy link
Author

liongkj commented Jul 25, 2020

With country code
^(+?6?01)[0|1|2|3|4|6|7|8|9]-*[0-9]{7,8}$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment