Tagged Fiddles
/\s*/
+123-123-1234
sdfkj
+1-123
+2-2-123-1234
(123)123-1234
(1)
(1)12
(1)123
(1) 123
(1)1234
(1)12345
(1)123456
x
x12
x123
x 123
x1234
x12345
x123456
1
2
12
123
1234 x1234
1234 x1234
1234 x.1234
1234 ext.1234
1234(1234)
1588-1588
0701231234
05051234
02-371-4822
023714822
1234 (1234)
02-234-1234 ext.1234
+82-2-1234-1234 ext.1234
1234 ext.1234
+82-2-1588-1588
+82-2 1588 1588
+82-2/1588/1588
+82-2.1588.1588
)(1234
1234
+82
+82-
+82-1234
+821234
+8212345678
+82123456789
123
1234567890123456
12345678901234567
000
/^\d{3}[- ]?\d{3}[- ]?\d{4}|^\+\d{2}[- ]?\d{2}[- ]?\d{3}[- ]?\d{4}|^[(]\d{3}[)][- ]?\d{3}[- ]?\d{4}|^[(]\+\d{2}[)][- ]?\d{3}[- ]?\d{3}[- ]?\d{4}/img
To check whether the phone and fax number provided is a compatible 10 digit phone number.
South African phone number formats
0123456789
012 123 1234
012-1231234
+27 84 826 6374
+27848266374
+27-84-826-6374
(084) 826 6374
(084)-826-6374
(084)8266374
(+27) 084 826 6374
(+27)-084-826-6374
(+27)0848266374
/\(?[0-9]{1}\)?[0-9]{4}[\s-.]?[0-9]{4}/
Matches phone numbers: optional parentheses around a 3-digit area code, followed by a 3-digit number then a 4-digit number with hyphens, periods or spaces in between.
(0)151 691 4939
/\(?[0-9]{3}\)?[\s-.]?[0-8]{3}[\s-.]?[0-9]{4}/g
Matches phone numbers: optional parentheses around a 3-digit area code, followed by a 3-digit number then a 4-digit number with hyphens, periods or spaces in between.
#+ Should match these:
(555) 123-4567
555-123-4567
555.123.4567
(555) 123.4567
5551234567
919-555-1234
#- Should not match these:
(55) 123-4567
(555) 123-456x
(555)) 123-4567
/\(?[0-9]{3}\)?[\s-.]?[0-9]{3}[\s-.]?[0-9]{4}/g
Matches phone numbers: optional parentheses around a 3-digit area code, followed by a 3-digit number then a 4-digit number with hyphens, periods or spaces in between.
#+ Should match these:
(555) 123-4567
555-123-4567
555.123.4567
(555) 123.4567
5551234567
919-555-1234
#- Should not match these:
(55) 123-4567
(555) 123-456x
(555)) 123-4567
/\([0-9]{3}\)\ [0-9]{3}\-[0-9]{4}/
Matches phone numbers: optional parentheses around a 3-digit area code, followed by a 3-digit number then a 4-digit number with hyphens, periods or spaces in between.
#+ Should match these:
(555) 123-4567
555-123-4567
555.123.4567
(555) 123.4567
5551234567
919-555-1234
(55) 123-4567
(555) 123-456x
(555)) 123-4567
Refiddle
Do you know PHP, Perl, Python or Java? View the docs to see
how you can help out
Tags
Displaying all 6 refiddles