Regex

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I need to check a number between 1-128 with 3 digits only

why this exprestion doesn't work

Regex re = new Regex(@"\b(12[0-8] | 1[0-1][0-9] | 0?[0-9]?[0-9])\b")

thanx.
 
How can limit with just digits
Do you know any links to learn Regex


----- Nico Vrouwe wrote: ----

Hi

Remove the spaces and it should work

HTH
/Nic

Oren said:
Hi all
I need to check a number between 1-128 with 3 digits only
why this exprestion doesn't work
Regex re = new Regex(@"\b(12[0-8] | 1[0-1][0-9] | 0?[0-9]?[0-9])\b")
thanx
 
Back
Top