Title |
Test
Find
Malaysia Mobile Number
|
Expression |
^([0])([1])([1,2,3,4,6,7,8,9])([0-9][0-9][0-9][0-9][0-9][0-9][0-9]) |
Description |
accepts malaysian mobile number example (011,012,013...) plus 7 additional numbers |
Matches |
0171234567 | 0141234567 | 0167791990 |
Non-Matches |
0151234567 | 0211234567 | 1011234567 |
Author |
Rating:
aresh saharkhiz
|
Source |
|
Your Rating |
|
Title: Inefficient pattern.
Name: g1smd
Date: 8/5/2012 8:13:23 PM
Comment:
The ^([0])([1])([1,2,3,4,6,7,8,9])([0-9][0-9][0-9][0-9][0-9][0-9][0-9]) pattern is very inefficient and simplifies to ^01[1-46-9][0-9]{7}$ here. The ([0])([1]) simplifies to 01 here. The ([1,2,3,4,6,7,8,9]) simplifies to [1-46-9] here. In particular the commas are incorect. The ([0-9][0-9][0-9][0-9][0-9][0-9][0-9]) simplifies to [0-9]{7} here.