3 ms·
There is nothing unique about Python's implementation of regular expressions. Ruby has an equally (if not more) powerful `StringScanner`. This is a nice article
by ioquatix 11y ago
There is nothing unique about Python's implementation of regular expressions. Ruby has an equally (if not more) powerful `StringScanner`. This is a nice article but it could have done without the "it's one of the best of all dynamic languages I would argue" tone.
- deleted 11y ago[deleted]
- lazyjones 11y agoPersonality cult? Perl programmers can only shake their heads at the post, since its regexp implementation is much more powerful and documented properly.
- ioquatix 11y agoI was going to mention Perl, but I decided it goes without saying :)
- simgidacav 11y agoModest and good perl programmer spotted.
- sdoering 11y ago@lazyjones reminded me of this: https://xkcd.com/1090/ https://xkcd.com/1090/
- the_mitsuhiko 11y ago> Ruby has an equally (if not more) powerful `StringScanner` The string scanner is just a step by step matching of individual expressions. Because they are not folded together the "skip non matching" part has been done in Ruby which is precisely what the Python scanner avoids.