My favorite regex of all time
catonmat.net
My favorite regex of all time
1–10 of 117 posts
Re: My favorite regex of all time
#2Re: My favorite regex of all time
#3Are people seriously still deliberately using ASCII-reliant code?
Re: My favorite regex of all time
#4Re: My favorite regex of all time
#5 [[:print:]]
to use the explicit character class.Re: My favorite regex of all time
#6Re: My favorite regex of all time
#7[ -~] #match only printable characters
It takes 5 seconds longer and with regexes, just knowing what the damn thing is trying to do is half the battle. When you use a regex, use a comment. Its the civil thing to do.
Re: My favorite regex of all time
#8Re: My favorite regex of all time
#9As someone who makes much of his living rehabilitating old perl scripts, please, if you must use such things, use them like this: [ -~] #match only printable characters It takes 5 seconds longer and with regexes, just knowing what the damn thing is trying to do is half the battle. When you use a regex, use a comment. Its the civil thing to do.
Re: My favorite regex of all time
#10As someone who makes much of his living rehabilitating old perl scripts, please, if you must use such things, use them like this: [ -~] #match only printable characters It takes 5 seconds longer and with regexes, just knowing what the damn thing is trying to do is half the battle. When you use a regex, use a comment. Its the civil thing to do.
It is the selfish (but smart) thing to do.