Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

hello maintainers. I am trying to parse bool expression like this using expr a>10 && b like '%abc' && c not in ['a', 'b'].
But expr does not support like natively. So is there any ways to make expr support 'like' bool expression.
Thanks, in advance!

You must be logged in to vote

Replies: 1 comment

Comment options

The matches operator is likely to meet your requirements. It verifies whether the left-hand operand conforms to the regular expression specified by the right-hand operand. For instance:

"aaa" matches "^a+$" == true
"abc" matches "^a+$" == false

https://expr-lang.org/docs/language-definition#operators

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #673 on July 01, 2024 17:39.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.