Subject: [xsl] XSLT Regex for Matching Curly Braces From: "Don Smith dsmith_lockesmith@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Mon, 10 Jun 2019 16:30:39 -0000 |
Hello, I'm attempting to write a regex inB XSLT on matching curly braces and then produce the correct markup output. Between my lack of expertise in regex generally and the special circumstances in XSLT with regard to AVTs and curly braces I'm having little success. The requirement is pretty straight-forward. Given a text node such as this: }B dui {elementum}.B Potenti ullamcorper vitae tempus condimentum dignissim facilisis arcu ligula {elementum} { I want the output markup to be: }B dui <ph>elementum</ph>.B Potenti ullamcorper vitae tempus condimentum dignissim facilisis arcu ligula <ph>elementum</ph> { So, two parts to my question: 1. What is the correct regex in XSLT to match a set of curly braces with one or characters between them and no white space? 2. Is <xsl:analyze-string> the best choice for processing the string via the regex and handling the output or is another approach preferred? Thanks Don
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Simple map and string-len, Michael Kay mike@xxx | Thread | Re: [xsl] XSLT Regex for Matching C, Martin Honnen martin |
Re: [xsl] Simple map and string-len, Michael Kay mike@xxx | Date | Re: [xsl] XSLT Regex for Matching C, Martin Honnen martin |
Month |