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

Apostrophe in function strcontains does not match #33

Open
morelgeorge opened this issue May 17, 2024 · 2 comments
Open

Apostrophe in function strcontains does not match #33

morelgeorge opened this issue May 17, 2024 · 2 comments

Comments

@morelgeorge
Copy link

Hello,
while I am writing some custom rules I found a possible issue with strcontains function.
For instance I would like to match all the objects with exactly following string:
'Arial'

So I put this value into strcontains function as a regex match pattern. Unfortunately strcontains does not match any string that contains apostrophe character. I tried to escape it but without any luck. Once I get rid of the apostrophe character then it works fine.

@morelgeorge
Copy link
Author

morelgeorge commented May 30, 2024

Finally, I was able to match 'Arial' word using this expression: \\\\u0027Arial\\\\u0027

I figured out that tostring function returns a json as a string and these special characters are replaced with unicode. So it can be used like that. Then strcontains works fine.

@NatVanG
Copy link
Owner

NatVanG commented May 30, 2024

Thanks for following up on this, I will look to reproduce and consider improvements asap.

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

2 participants