What is [50-99] in regular expression?
4 comments
The O'Reilly book Mastering Regular Expressions maybe worth it. Old but regexes haven't changed much.
[50-99] matches 5, any character in the range 0-9, or 9. So the 5 and second 9 are redundant.
[50-99] matches 5, any character in the range 0-9, or 9. So the 5 and second 9 are redundant.
Check https://regex101.com/ to play with Regex various flavors ...
+1 on Mastering Regular Expressions, haven't read the other books but I've found this one useful at getting the concepts
+1 on Mastering Regular Expressions, haven't read the other books but I've found this one useful at getting the concepts
yAs the slide says, “It is same with [0-9]: the set contains already 5 and 9” (I would write “it is the same as”, and think “with” is incorrect English, but maybe that’s some dialect, archaic, or shows my knowledge of English isn’t perfect)
Taken apart
Taken apart
[ any of
5 the digit ‘5’,
0-9 any character in the range ‘0’ through ‘9’ (inclusive),
9 the digit ‘9’
] end marker for ‘any of’.regexr.com is also a nice tool to play around with/understand regexes
Source: https://www3.cs.stonybrook.edu/~pfodor/courses/CSE307/L02_Programming_RE.pdf
Also, please tell me how to learn regular expressions? Recommend some university/any courses to take for learning regular expression for backend development. (Not the one we learnt in theory of automata and computation).
There are lots of resources to learn it like regexpal for testing regular expressions, regexone.com for learning it. But how'd you learn it? Like what process do you follow to learn it?
Which book would you recommend out of these? 1) Beginning regular expressions Andrew Watt
2) Introducing regular expressions oreilly
3) Introducing regular expressions oreilly
4) Javascript regular expressions packt
5) Mastering regular expressions oreilly
6) Regular expressions pocket primer
7) Regex quick syntax reference