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 regex case use clarification #2489

Merged
merged 2 commits into from
Feb 14, 2019
Merged

Add regex case use clarification #2489

merged 2 commits into from
Feb 14, 2019

Conversation

a10kiloham
Copy link
Contributor

No description provided.

@@ -12,6 +12,8 @@ class TriggerAgent < Agent

The `type` can be one of #{VALID_COMPARISON_TYPES.map { |t| "`#{t}`" }.to_sentence} and compares with the `value`. Note that regex patterns are matched case insensitively. If you want case sensitive matching, prefix your pattern with `(?-i)`.

Where `type` is regex, note that the delimiters are not used and Liquid variables can be used normally. To search for just a word matching the concatenation of `foo` and variable `bar` would use `value` of `foo{{bar}}`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Liquid can be used in every configuration field of the Agent. In theory one could also make a comparison dynamic with {{field_name}}>value, even though I am not sure how useful that would be 😄

To which "delimiters" are you referring to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The leading and trailing delimiters - those coming from other languages would naturally include the leading and trailing / or | to denote a regexp like /foo/ is normal for PHP etc.

@dsander
Copy link
Collaborator

dsander commented Feb 14, 2019

Thanks!

@dsander dsander merged commit d58d002 into huginn:master Feb 14, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants