[xquery-talk] regexp help
pooja singh
p03singh at yahoo.com
Tue Dec 21 11:11:43 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
$fileNumber/text()
else
'0'
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.
Thanks,
Pooja
Do you Yahoo!?
All your favorites on one pe
---------------------------------
Do you Yahoo!?
Meet the all-new My Yahoo! Try it today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xquery.com/pipermail/talk/attachments/20041221/8c943a2b/attachment.htm
More information about the talk
mailing list