[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Using parameter as regex in matches() function
> From: Michael Kay [mailto:mike@xxxxxxxxxxxx] > Sent: Thursday, May 29, 2008 6:10 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: Using parameter as regex in matches() function > > You want > > matches(., concat('^', $criteria_name, '$')) Assuming that $criteria_name doesn't include any regular expression meta characters. Unfortunately, XSL doesn't have the Perl equivalent of quotemeta() built into the library. Certainly you can write a replace() to do it and create a quotemeta() function to wrap it, but it would have been nice to say: matches(.,concat('^',quotemeta($criteria_name),'$')) Andy.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|