Hello,
I see in the documentation that we could make xpath rules
but I don’t have the impression that we can make a regex, I saw that it has a field with Ant-style matching patterns, but I don’t know if it corresponds to a regex expression
in my case , I would like to check the syntax of the calendar name with a regex
java.lang.IllegalStateException: Failed to compile XPath expression based on user-provided parameter [//Calendars/Calendar[fn:matches(@name,'^[a-zA-Z0-9]*_[a-zA-Z0-9]*$')]]
Unfortunately, you won’t be able to write such a pattern with our XPath rule, as your rule is based on XPath 3.1 syntax.
The XML analyzer XPath rule we are providing is only able to process XPath 1.0 syntax. We tried in the past to provide support of XPath 2.x and 3.x, without success. See SONARXML-68 for further details.