I am using XSLT with regexp:match exslt function. The said function takes JavaScript Regex pattern. Therefore I am trying to match a set of numbers 1 thru 3 OR 5 thru 7 OR 9 thru 23.
Following is the regex pattern I've come up with:
(^[1-3]$|^[5-7]$|^[9-23]{1,2}$)
This regex does NOT match with any value at all. Following alternate pattern is good only to a little extent:
(^[1-3]$|^[5-7]$|^9$|^[10-23]{2}$)
While this matches with all other expected number values except 14 thru 19. Why is it so and how to make the Regex good. BTW, I am using http://www.regextester.com/ to test the pattern matching.
Thank you.
$|^instead oftokenGroup|otherTokenGroup, which would make sense.