Must ask regex (replace) question here...
Added by Anonymous over 19 years ago
Legacy ID: #3248052 Legacy Poster: Curtis (cdfisher07)
I still cannot recieve XSLT lists from mulberry, sorry. I am using the replace function in Saxon 8 to remove double qutes at both ends of a string and because XSLT is particular about string quotes, I cannot seem to make regex escape backslashes work correctly. Is there a way that this can be accomplished. Thanks, as always... Curtis Fisher
Replies (2)
RE: Must ask regex (replace) question here.. - Added by Anonymous over 19 years ago
Legacy ID: #3248116 Legacy Poster: Michael Kay (mhkay)
I've been cut off from xsl-list myself for the last week... Simplest approach, to minimize confusion over escaping, is to put the regex in a variable like this: <xsl:variable name="regex" as="xs:string">"</xsl:variable> and then use the variable: replace($in, $regex, ....) Michael Kay
RE: Must ask regex (replace) question here... - Added by Anonymous over 19 years ago
Legacy ID: #3248137 Legacy Poster: Curtis (cdfisher07)
Thanks Michael, but that won'r work either. Here is what I get with <xsl:variable name="regex" as="xs:string">"</xsl:variable>: Error on line 38 of file:/C:/Saxon/projects/HelpBinder/HelpIndex.xsl: FORX0002: net.sf.saxon.type.RegexTranslator$RegexSyntaxException: Error at character 1 in regular expression: bad escape sequence Transformation failed: Run-time errors were reported 10:01:58.81
Please register to reply