3
ayushgp
7y

When writing regexes why the fuck would you not use \w instead of writing [a-zA-Z0-9] or \d instead of [0-9] or the dozen other metacharacters? Makes it so fucking hard to decrypt long regexes.

Comments
  • 1
    Mainly because many of us are unaware of those shortcuts
  • 1
    I prefer it to be [A-Z].... simply because it’s taken me a week to get this thing right, and when I have to come back in 6 months time and adjust it to do something else or ignore some random character I prefer to see this complex, single line of “what the fuck is this”.
Add Comment