Why does the regexp package in Go no support decent regexp? For example the character classes \w and \s are not implemented as of Go r60.3. Also (?:non) capturing groups are not recognized.
Use the "current state of art" regexp package. It has support for \w
and \s
and also handles non capturing groups (?:re)
.
The documentation states that 'Package regexp implements a simple regular expression library' so I guess it's not a priority at the moment to have a fully featured regex library.
EDIT : disregard that : I hadn't had a look at the recent versions of the regexp package
If that's really a question, I suppose we could answer that nobody for now took the time to build a complete regexp library.
If you do so, don't forget to take into account that modern regexp need to be correct regarding Unicode. Speaking of the \w you mentionned, that's not so simple : 'é' is a word character. Don't port something like the standard javascript regexp packages.