RE: [xsl] Using Tokenize with Lookbehind Regexp

Subject: RE: [xsl] Using Tokenize with Lookbehind Regexp
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 8 Oct 2008 12:33:12 +0100
There's no "(?" in the XPath 2.0 regex dialect, and I don't think there's
any way of doing what you want to do with a simple call on tokenize(). 

> 
> I want to separate the string at each white-space if the 
> string before is longer than 70 signs
> 

You could try replace() followed by tokenize(): 

tokenize(replace(., '(.{70}.*)(\s+)', '$1|'), '|')

(where '|' is some character that's not used in your input)

(not tested)

Michael Kay
http://www.saxonica.com/ 

Current Thread