This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Regex string function question
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Regex string function question
- From: Uche Ogbuji <uche dot ogbuji at FourThought dot com>
- Date: Wed, 24 Jan 2001 23:12:16 -0700
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Random thoughts :
>
> <aaa>
> <bbb>123</bbb>
> <bbb>ZYX</bbb>
> <ccc>123</ccc>
> <date-time>a nice time was 2001-01-24T09:20:25<date-time>
> </aaa>
>
>
> Select all nodes containing a number :
>
> <xsl:apply-templates select="//*[match-regexp(.,'\d')]"/>
>
> =======================================================
> All nodes with names starting with b or c:
> <xsl:apply-templates
> select="//*[match-regexp(name(),'\A[bc]')]"/>
>
> ===============================================================
Noting that 4XSLT has the equivalent of your match-regexp function through its ft:match extension function.
--
Uche Ogbuji Principal Consultant
uche.ogbuji@fourthought.com +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list