Regex Problem

R

Roshawn Dawson

Hi,

I'm trying to write a regular expression that simply tests if a number
is between 1 and 250.

Can anyone help this regex newbie?

Thanks,
Roshawn
 
B

Boni

1. May be it is not what you want, but Int32.Parse(yourstring)<250 and
Int32.Parse(yourstring)>1 would do the job :)
2. Your regex : ([2][0-5][0-9])|([1]{0,1}[0-9]{1,2})
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top