[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:analyze-string use clarification needed
I'm having a problem understanding xsl:analyze-string, or perhaps the problem is with my regex. I'm working with a VARCHAR2 column in an Oracle database. This column has been "re-purposed" to hold three data items in a formatted structure. I need to inspect this field for data entry errors. One of the most common errors is the failure to include one or more spaces to separate the individual data items. I have written the test template below. What I expect to see as output is "XY". What I get is "". Can someone point out my error(s)? Thanks. <xsl:template match="/"> <xsl:variable name="position-code-candidate"> <xsl:analyze-string select="'XY02/28/2007 L'" regex="^\w+"> <xsl:matching-substring> <xsl:value-of select="regex-group(1)" /> </xsl:matching-substring> </xsl:analyze-string> </xsl:variable> <xsl:value-of select="$position-code-candidate" /> </xsl:template> -- Charles Knell cknell@xxxxxxxxxx - email
|
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
|