-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regex support? #409
Comments
It's not included in the current version, but there are plans to add regexp support and there is some progress towards it. The idea is to support a subset re2 regexes without \C (like Go's regexps). Unfortunately it will certainly introduce (small) differences between regexps supported by the implementations. This occupies a similar place as YAML – it is very useful, but the spec is not as precise as we would like. FYI I have also played with an alternative – parser combinators, which are in some ways superior to regexps: https://github.com/sbarzowski/jsonnet-parser-combinators. Here is an example of parsing (and evaluating) arithmetic expressions using that library: https://github.com/sbarzowski/jsonnet-parser-combinators/blob/master/examples/arithmetic.libsonnet. |
In Tanka we inherited the
Not having too much experience with them, but some people seem to use them and I did not hear any complaints so far |
I would suggest adding regex support (search, replace) and specify it as using the re2 spec. You won't find a better specified and more cross-language spec or regular expressions than re2 I think. |
Is there a way to perform regex search/replace or just search?
If not, would this be desired functionality?
The text was updated successfully, but these errors were encountered: