ycomp
ycomp

Reputation: 8563

1-2 digit number, but not 0 (i.e. any number 1-99)

I'm new to regular expressions.

I'm stuck how to modify [0..9]{1,2} (this matches any 1-2 digit number I think) to match any number 1 to 99

so, how could I match any number 1-99 ?

Upvotes: 1

Views: 258

Answers (1)

sp00m
sp00m

Reputation: 48807

For 1 to 99, you can use [1-9][0-9]?,

Upvotes: 7

Related Questions