2 ms·
regular expressions have structure. That's why you can concatenate two regular expressions a b to ab and you have a resulting expression that will match a str
by dekhn 5y ago
regular expressions have structure. That's why you can concatenate two regular expressions a b to ab and you have a resulting expression that will match a string if a matches its first part and b matches the rest
Mainly what you're showing is that regular expresisons are awkward for matching certain types of syntax. You could have split each of the unique components in your expression into small parts and it would be much more readable.
- jimsimmons 5y agoCompletely agree. My point is that having things broken down and built up gradually (aka procedural) is a better approach than one shot declarations.