Richard wrote:
XSLT regex syntax allows: "* X{n}? matches X, exactly n times
- X{n,}? matches X, at least n times
- X{n,m}? matches X, at least n times, but not more than m times"
of which I'm trying to use the second with the replace() function like this: replace($text, '(.{n,}?)\s+', '$1
')
Why did you change from the third type to the second type when moving from sed to XSLT? Your sed example was equivalent to (.{0,X}?)\s+ wasn't it? Changing type will change the meaning of the regex.