[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xslt 2.0 regex and how to test it
> <xsl:value-of select="replace(., '\[[^\]]+\]', '')"/> Thanks for your solution, works perfect. Let me try to verbalize the regex (" for better readability): "\[[^\]]+\]" the string starts with "[" and ends with "]": SingleCharEsc "\[" and "\]" in between there is a charGroup: "[]" with a quantifier "+" for one or more occurrences the charGroup is a negcharGroup, as it starts with: "^" it contains one character "]": SingleCharEsc "\]", thus allowing for one or more characters which are not "]". >> How do you recommend to test xslt regex? Is it possible to >> to see what is actually matched? >I'm not sure what you're looking for ... I would prefer to try it out with an editor's find. To my surprise your solution worked fine with SciTE. One difference I noted was, that SciTE does not need the SingleCharEsc within the charGroup. Regards, Manfred
|
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
|