Skip to content
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

Add support for regex literals in the language. #265

Closed
tsandall opened this issue Feb 16, 2017 · 0 comments
Closed

Add support for regex literals in the language. #265

tsandall opened this issue Feb 16, 2017 · 0 comments

Comments

@tsandall
Copy link
Member

tsandall commented Feb 16, 2017

Currently, regular expression patterns have to be escaped as Rego only supports strings. This makes it somewhat annoying to write policies that depend on regex:

> re_match("\\s\\d\\s", " 1 ")

We should introduce support for regex literals or raw strings so that users can enter patterns without escaping the pattern contents.

@tsandall tsandall changed the title Regular expression patterns Add support for regex literals in the language. Jul 6, 2017
mmussomele added a commit to mmussomele/opa that referenced this issue Jul 19, 2017
This allows for easier construction of regex patterns, as things don't
need to be double escaped.

Fixes open-policy-agent#265
tsandall pushed a commit that referenced this issue Jul 20, 2017
This allows for easier construction of regex patterns, as things don't
need to be double escaped.

Fixes #265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant