Few strata of geekery are more obsessive than regular-expression geekery. So let’s have some fun! In https://www.tbray.org/ongoing/When/202x/2024/09/22/Unbackslashing I explain why using the usual backslash “\” for escaping is hellishly inconvenient in a current project and propose replacing it with one of «, —, “, ¶, §, or ~. This Friday, I’ll be running some polls tagged #unbackslash to let you all join in.

#software #regex

Unbackslash

ongoing by Tim Bray

@timbray Precedent: the regexp processor of the MOO programming language used (uses!) % instead of \. I think it got this from somewhere else before it, too, but I don’t know where.

Why are you planning to write your own regexp processor instead of using Go’s? It is good and linear time (although the constant factors aren’t great in comparison to some others). You can even construct an AST from your own regexp syntax and let it do the NFA/DFA conversion and simulation for you

@dpk As to using Go's regex: My NFA representation is is idiosyncratic, hyper-optimized for raw matching speed, and does much less than Go's. The only result I want is a boolean matches/doesn't-match, so the Go machinery has loads and loads of stuff I don't need.