mazek_59373
Mar 02, 2009Nimbostratus
regexp
Hi,
I'm trying to match via a simple regexp an URI. It can be in a form of:
/sth/digits
/sth/digits.digit
/sth/digits_digit
example URI to be matched is: /aaaa/999.8
I would like to get only "999" of it. I'm trying to use regexp below:
set matched [regexp {([0-9]+)[\._]{0,1}[0-9]{0,1}$} $url id]
but id is still matched as a 999.8?
Regexp is quite simple, but maybe I misunderstand something. Any hints?
br
mazek