[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

regular expression question

Michael Kay mhk at mhk.me.uk
Tue Jun 28 23:38:46 PDT 2005


regular expression question
Being an old-fashioned XPath 1.0 sort of person, I would tend to write

contains($p, ',') and not(contains($p, ';'))

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

> -----Original Message-----
> From: http://xquery.com/mailman/listinfo/talk 
> [mailto:http://xquery.com/mailman/listinfo/talk] On Behalf Of Howard Katz
> Sent: 28 June 2005 21:46
> To: http://xquery.com/mailman/listinfo/talk
> Subject:  regular expression question 
> 
> I haven't done much to date with regular expressions, so 
> here's what I'm
> sure is a very easy question (if you know the answer! :-)
> 
> I have <p> elements containing text that is separated 
> internally by either
> comma or semicolon delimiters or both. I want a regular 
> expression that'll
> let me tokenize a <p> element into its constituent pieces only if it
> contains one or more comma separators and *doesn't* contain a 
> semicolon. Ie,
> what's goes in the regular expression slot for
> 
>    for $p in ... /p
>    return
>        if ( fn:matches( $p, " ??? comma-yes semicolon-no ??? " ))
>        then let $tok := fn:tokenize( $p, "," )
>        else ...
> 
> TIA,
> Howard
> 
> _______________________________________________
> http://xquery.com/mailman/listinfo/talk
> http://xquery.com/mailman/listinfo/talk
> 




PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.