Regex Samples

From HaFrWiki42
Revision as of 10:54, 17 February 2015 by Hjmf (talk | contribs) (→‎Regex Samples)
Jump to navigation Jump to search

Regex Samples

Always be precise in the way you specify your data. The following question can be multiple interpreted.
Create a regular expression that matches the figures:

  • 1 - 49
  • 01 - 49

Of course the ^[0-4]?[0-9] is much too simple.

Matches correctly but recognize 11 first as 1 and 1
Matches correctly but recognize 11 first as 1 and 1
Matches correctly but recognize 51 as 5 and 1
Matches all correctly

See also

top

Reference

top