...library, Slides) Tool to check if you are affected Ruby: Using named groups in Regex Exercises Find words Write a method second_words(string) that returns the second word of...
You don't need to implement the parser as a single giant regex. Instead write individual patterns for methods, accessors, etc. Call each patterns until there are no...
Best results in other decks
You can write regular expressions some different ways, e.g. /regex/ and %r{regex}. For examples, look here. Remember that it is always a good idea to match a regex visually...
Alternation cat|dog will match cat in "About cats and dogs", if RegEx is applied again, it will match dog Quantifiers ? none or one, e.g. colou?r matches...
When you repeat a subpattern with a *, + or {...} operator, you may choose between greedy, lazy and possessive modes. Switching modes...