Regex with multiple lines never has a match - Mendix Forum

Regex with multiple lines never has a match

0

Hi community,

Before I submit a support ticket, I want to validate I'm not making mistakes :)

https://modelshare.mendix.com/models/031038db-ebe3-487c-9838-a51e5134b6a3/regex-bug

If I do a match with the regular expression .* I would expect it always matches for any input. However, in this example I have multiple lines as input and now it states that is has no match. This is inconsistent with the results of https://regex101.com/r/XjLUDM/1

Is Mendix wrong here?

Thanks for checking with me!

asked
1 answers
1

Mendix does not set the muiltiline flag.

And isMatch checks the whole string for a match.

In isMatch(), the regex is implicitly anchored at ^ and $

So, nothing wrong with that behaviour.

answered