RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 3
Title Test Details UK residential phone numbers
Expression
^(?:\(\+?44\)\s?|\+?44 ?)?(?:0|\(0\))?\s?(?:(?:1\d{3}|7[1-9]\d{2}|20\s?[78])\s?\d\s?\d{2}[ -]?\d{3}|2\d{2}\s?\d{3}[ -]?\d{4})$
Description
Matches valid UK residential telephone numbers in all expected formats, including international.
Matches
02081234567, 0208 123 4567, 0208 123-4567, +44 208 123 4567, +44 (0) 208 123 4567, 01234 567 890, +44 0 1234 567-890, 07712 123 456
Non-Matches
020812345678, 123456789, 07612 123 4567
Author Rating: The rating for this expression. Antony Kennedy
Title Test Details ISO 8601 Time
Expression
^(?:[0-1][0-9]|[2][0-3]):?(?:[0-5][0-9]):?(?:[0-5][0-9]|60)|2400|24:00$
Description
Matches HH:MM:SS and HHMMSS as well as the special 24:00 and 2400 - check http://en.wikipedia.org/wiki/ISO_8601#Times for more data.
Matches
01:01:01 11:01:01 21:01:01 24:00
Non-Matches
25:01:00 240000
Author Rating: Not yet rated. Antony Kennedy
Title Test Details ISO 8601 Duration
Expression
^P(([0-9]+([.,][0-9]*)?Y)?([0-9]+([.,][0-9]*)?M)?([0-9]+([.,][0-9]*)?D)?T?([0-9]+([.,][0-9]*)?H)?([0-9]+([.,][0-9]*)?M)?([0-9]+([.,][0-9]*)?S)?)|\d{4}-?(0[1-9]|11|12)-?(?:[0-2]\d|30|31)T((?:[0-1][0-9]|[2][0-3]):?(?:[0-5][0-9]):?(?:[0-5][0-9]|60)|2400|24:00)$
Description
Test for valid ISO 8601 duration value
Matches
P3Y6M4DT12H30M5S P23DT23H P4Y P1M PT1M P0.5Y P0,5Y PT36H P1DT12H P0003-06-04T12:30:05
Non-Matches
1234567
Author Rating: Not yet rated. Antony Kennedy
   Displaying page 1 of 1 pages; Items 1 to 3

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials