September 17th, 2009, 08:18 AM
Capture number NOT starting with a decimal point
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.
Scott Perham, BSc (hons), CCNA, MCPD
September 17th, 2009, 12:59 PM