On 29 February 2016 at 18:51, Greg Reagle <greg.rea...@umbc.edu> wrote: > Another approach would be to write a structural regexp library. Then > structural regexp's could be available to other programs.
I've been thinking about this, actually. What might be even better is a regular expression library which just makes it easy to build structural regular expressions on top of it. The interfaces of common libraries, be they Unix or Plan 9 or RE2, are not sufficiently expressive to support this, which is why those programs that do feature structural regular expressions have a custom engine baked in. This would require quite careful planning of the library's API in order to work well, though. I'm giving it some thought at the moment anyway. cls