TRE Python binding — ReDoS robustness demo

Simon Willison Blog
Generative AI

Research: TRE Python binding - ReDoS robustness If it's good enough for antirez to add to Redis I figured Ville Laurikari's TRE regular expression engine was worth exploring in a little detail. I had Claude Code build an experimental Python binding (it used ctypes ) and try some malicious regular expression attacks against the library. TRE handles those much better than Python's standard library implementation, thanks mainly to the lack of for backtracking.