vb.net match all with regex

hello there,
I would like to match all of the images that have been downloaded between 120 and 150.. something like this but its not working..

<SPAN class=fcg>[120-150].*?downloaded images</SPAN>

this is the original code..

<SPAN class=fcg>2 downloaded images</SPAN>
<SPAN class=fcg>130 downloaded images</SPAN>
<SPAN class=fcg>25 downloaded images</SPAN>
<SPAN class=fcg>552 downloaded images</SPAN>
<SPAN class=fcg>6592 downloaded images</SPAN>
<SPAN class=fcg>64 downloaded images</SPAN>
LVL 1
XK8ERAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cyberkiwiCommented:
You need the pattern "1([2-4]\d|50)" and the bits around it
It must start with a "1"
The the next part is an OR between
    (1) "[2-4]\d", i.e. 2x through 4x (20-49) and
    (2) "50" exactly 50
XK8ERAuthor Commented:
ok to make it more simple im trying to match the whole

<SPAN class=fcg>*** downloaded images</SPAN>

and any number above 100
bansidharCommented:
if you want to match be between 100-999 use this
<SPAN class=fcg>([1-9]\d{2}).*</SPAN>

or any number greater than or equal or above 100
<SPAN class=fcg>([1-9]\d{2,}).*</SPAN>

OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

XK8ERAuthor Commented:
ohh man this is so hard.. that code works perfectly fine.. but how can I make 75 and above or 50 and above etc..?
cyberkiwiCommented:
regex is not a arithmetics-based pattern, so you can't say... this part is between this and that number
You will notice throughout your questions here and php, that the trick always involves elaborately dealing with the number as a text pattern or a series of them
If you have a specific pattern in mind (for that is what regular expressions is all about), we can help, but if you want to keep asking different questions (numeric based), then this may not be the right way to do it.
XK8ERAuthor Commented:
yeah but maybe if you tell me which chars I need to change for that I can do like

100 and above
80 and above
60 and above

I would really appreciate it..
cyberkiwiCommented:
>100 and above
Does that include up to 999? or 1000, 100000?

80-99
regex: [89]\d    << 8 or 9, followed by one digit

60+ Any valid number
regex: ([6-9]\d|1\d{2,})     << either (1) 60-99, as above, or (2) "1" followed by 2-or-more digits
cyberkiwiCommented:
100+ covered by bansidhar above
bansidharCommented:
you are getting into more complex areas here

50 and above
<SPAN class=fcg>([5-9]\d{1}|\d{3,}).*</SPAN>

75 and above
<SPAN class=fcg>(([7-9][5-9])|([8-9]\d{1})|\d{3,}).*</SPAN>

as cyberkiwi mentioned it is not a straight forward mathematical rule even though it uses a lot of mathematical skills
XK8ERAuthor Commented:
yes I understand and I thank you guys for answering all the questions.. I got all the ones that I needed but lets say I need a few more how do I make new ones there is no translator for this..
bansidharCommented:
suggestion: don't use regex unless you are very comfortable with it. it is like a very sharp 2 edged sword. use with care.
bansidharCommented:
try using some tools, like regexbuddy (never used came across googling)
cyberkiwiCommented:
I see I made a mistake

60+ Any valid number
regex: ([6-9]\d|[1-9]\d{2,})     << either (1) 60-99, as above, or (2) "1-9" followed by 2-or-more digits

bansidhar has shown some good patterns, just some minor notes

This pattern ([5-9]\d{1}|\d{3,}), or specifically this part "\d{3,}"  allows leading 0's to be mistakenly accepted, e.g. "002"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
XK8ERAuthor Commented:
thanks guys.. you are the best!
bansidharCommented:
thanks for pointing out the error. typing from my mobile
actually both above 50 and above 75 has this error

have to change
\d{3,}
to
[1-9]\d{2,}

but here also you can fool it by sending 09999 and it won't recognize it. if you want to take into account all the possibilities the equation will become very complex (so omitting it). If you want i can make one but first have to get to a computer.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.