xsl-list
[Top] [All Lists]

Re: [xsl] Text based stage play scripts to XML

2011-01-24 07:32:14
On 24/01/2011 13:25, Jacobus Reyneke wrote:
  so I cannot search for dog
or cat. What I need to do is to find something lying between two
regular expressions matchin "the sound" and "makes" and wrap that
something in an<animal>  tag.

xskt doesn't have non capturing groups so there are some edge effects that you need to clean up on a second pass if there are possibilities of the "pre" text of one animal overaping the "post" text of another
but
regex="(the sound)(.*)(makes)"

gives you the animal as regex-group(2) more or less.


David


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________

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