Given a string of characters:
<xsl:variable name="string" select="'aa^a^aaa^aaaaaa^aa^aa^aaaaaa^'"/>
I want to break that string into substrings up to a given length, so
that the words including circumflexes ('^') are no longer than the
specified length.
I'm trying do this with a regex (in this example the length is 6):
<xsl:variable name="substring" select="tokenize($string, '.{1,6}\^')"
as="xs:string*"/>
This regex must be wrong because $substring now holds a sequence of 6
items (as expected), but each of those items appears to be ' '. For
example this bit of debug:
x<xsl:value-of select="for $y in $substring return concat($y, 'z')"/>x
produces:
xz z z z z zx
What's the correct regex for this problem?
thanks
andrew
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--