3 ms·
Personally, I would not use this. One of the powers of regex is the similarity (depending on complexity and structure) between the regex pattern and what a matc
by eCa 13y ago
Personally, I would not use this. One of the powers of regex is the similarity (depending on complexity and structure) between the regex pattern and what a matching string looks like. By doing it this way, a lot of noise is introduced that can make parsing more difficult.
I don't find:
find { matching { [word, "-"] }.multiple }
Clearer than:
([\w\-]+)
It might be an alternative way introduce regexes though.
I would also like to see a more complex regex written this way.
- krainboltgreene 13y agoIn that example I wanted to show off a the matching and multiple syntax.