All Tags »
RegExp »
regex (RSS)
Sorry, but there are no more tags available to filter with.
-
zip: asuffield: zip: The fact that there's this much discussion about as simple a regex as "is it 6 numeric characters?" is why regexes are more trouble than they're worth at least half the time. If I can write code that does what the regex does in less than 60 seconds, there's no reason to use one....
-
dhromed: If your regex engine does that, it depends on the flavour. :) Perl. In JS, /^\d{6}$/ will test for precisely six numeric characters, and not the newline. $ will test for the end of the string. It will return false on "123456\n", as the end of the string is not taken by a digit. When multiline...
-
tster: AbbydonKrafts: Not too bad. It's a little overkill to instantiate a Regex object just for that. I would've stuck with a numeric and length check. probably because you have not mastered regexes. Otherwise you would have realized that "^\d{6}$" is much easier to write and maintain than however you...
Page 1 of 1 (3 items)