|
|
|
|
|
by eCa
4666 days 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. |
|