I have a use of regular expressions where I need the "atomic" matching features that I can get for several other languages, such as atomic matching groups and "possessive" quantifiers. I'm willing to forego the blazing performance of Go's standard library dfa matcher for this particular case. I cannot write an equivalent regexp for Go's "regexp", and the additional code I would have to write for equivalent functionality is prohibitive.
Is there any reason to believe that downloaded modules such as this are well-tested and reliable?
To pursue this problem,, I wrote small programs that perform the same operation in isolation in some other languages that have regular expression implementations the have the features I want, in particular
Java, whose java.util.regex module provides the desired features
Python, which has a module "regex" downloadable from the PyPI (Python program index) that replaces the standard "re" module but has my desired features
Also Go, using the downloaded module I mentioned
Only the Go version fails. Of course, it's the fault of the downloaded library, not Go itself :)
Anyone know of any other Go nfa implementations with the aforementioned features?
As much as I appreciate the advantages Go's dfa "regexp" module, there are times when a more full-featured nfa implementation is useful. (And, a well-written regexp for nfa can be pretty fast if the aforementioned features are used to prevent excessive backtracking.)
If anyone is interested in looking into the failure I experienced, I'd be happy to send the little programs I wrote to investigate this.