3 ms·
You can get a fair distance with character classes[1] like `[[:digit:]]` and free-spacing[2] with `/x` or `(?x)`, where supported. And/or yeah, build regexes o
by Groxx 7y ago
You can get a fair distance with character classes[1] like `[[:digit:]]` and free-spacing[2] with `/x` or `(?x)`, where supported.
And/or yeah, build regexes out of descriptive fragments. It doesn't take much effort to make them readable, you don't have to have one giant blob of !(#&$()*. Plus then your regexes become relatively easily-validated teaching tools for readers.
[1]: https://www.regular-expressions.info/posixbrackets.html#class https://www.regular-expressions.info/posixbrackets.html#clas...
[2]: https://www.regular-expressions.info/freespacing.html https://www.regular-expressions.info/freespacing.html