
September 17th, 2009, 08:18 AM
|
 |
Contributing User
|
|
Join Date: Jun 2004
Location: Surrey, UK
|
|
|
Capture number NOT starting with a decimal point
Hi all,
I have been trying to write an expression which captures numbers... easy enough - but here's the catch, i only want to capture numbers which don't start with "." so:
hello 1 world = 1
hello 1.2 world = 1.2
hello .2 world = no match
hello .1.2 = 1.2
All my attempts have matched all of the above which isn't what i want!
Im not entirely sure but do i need to use backreferences here? I have looked around online but nothing seems to help.
Im going crazy over this... any help would be much appreciated.
Thanks
__________________
Scott Perham - MCPD
That URL too long? Why not URL IT!
|