xsl-list
[Top] [All Lists]

Re: [xsl] Negative lookahead/behind in XSL regexp

2011-05-09 03:42:08
On 9 May 2011 09:32, Clint Redwood <clint(_at_)screwtape(_dot_)co(_dot_)uk> 
wrote:
Hi,

I'm using regexp in XSL to process input text data into a selection of fixed 
values. This works for most of my requirements but I have one key word which 
I need to exclude if preceded by one word or followed by another. It appears 
that lookahead and lookbehind are not included in the XSL2.0 specification, 
so I'm looking for an alternative way of doing it.

The only way I've found so far involves lots of nested groups with negated 
character classes and is very messy with long words.

Anyone got a neat way of doing it?

Hard to say without sample inputs and outputs... could you add another
step after the regex processing and exclude the key word there?


-- 
Andrew Welch
http://andrewjwelch.com

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>