[xquery-talk] regexp help

pooja singh p03singh at yahoo.com
Tue Dec 21 10:47:54 PST 2004

Greetings All!

I am trying to write a regular expression that match a string that has only digits but no letter or anything else. 


For example 12.6 Days should not match in the regular expression

But 1100 should match . There can be upto 15 digits in the string

if (fn:matches($fileNumber/text(),"\d[0..15]")) then





The above regular expression matches 12.3 Days also, it should return ) instead.


Could someone please suggest how to write regular expression that will return string (of digits) if it has only digits. If the string has a mix of digits with letter then it should return zero.




Do you Yahoo!?
 All your favorites on one personal page – Try My Yahoo!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xquery.com/pipermail/talk/attachments/20041221/8a2dab71/attachment.htm

More information about the talk mailing list