Custom Rule with regex

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
<Calendar name=“c_standard” year=“2019” publicHolidays=“1” specificDays=“0” firstInWeek=“0”

In the Custom Rule form
Field Expression
//Calendars/Calendar
Field FilePattern
nothing yet

I tried to add “match” in the xpath expression but it doesn’t work
Can you help me
Thanks.

  • SonarQube 8.4.2

I just tested
// Calendars / Calendar [fn: matches (@name, '^ [a-zA-Z0-9] * _ [a-zA-Z0-9] * ')] I have the error message 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]*')]]
the doc that I followed
https://www.w3.org/TR/xpath-functions-31/#func-matches
can you help me ?
Thanks

hello !
no one has dealt with this type of case ?
thanks