Custom Rule with regex

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
Field FilePattern
nothing yet

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

  • 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
can you help me ?

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