|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] regular expression questionMichael Kay mhk at mhk.me.ukTue Jun 28 23:38:46 PDT 2005
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








