Need regx

I need a regx that checks for the following:

starts with "prop" or "s.prop" or "evar" or "s.evar"
immediately follows and ends with a number between 1-75
case insensitive

So possibilities are:

s.prop(1-75)
prop(1-75)
evar(1-75)
s.evar(1-75)

Example values:
prop1
prop23
prop75
s.prop44
evar36
s.evar60
894359Asked:
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.

RobOwner (Aidellio)Commented:
Try this:
[s\.]*[(prop)|(evar)]+[0-9]{1,2}
0
RobOwner (Aidellio)Commented:
Example: some match some don't, this just tests that for you
<!DOCTYPE html>
<html>
<body>

<script>
var str = "prop Prop3 s.evar44 evar5 s.prop s.prop43";
var patt1 = /[s\.]*[(prop)|(evar)]+[0-9]{1,2}/ig;
document.write(str.match(patt1));
</script>

</body>
</html>

Open in new window

0
RobOwner (Aidellio)Commented:
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

894359Author Commented:
Hi Tagit,
Something is not working properly with the regx values like prap ppop  pppp43  eeee43 still match?
0
894359Author Commented:
also will match prop76 and prop111
0
RobOwner (Aidellio)Commented:
Yes your right, had to tweak it slightly:
http://jsbin.com/uXIgimo/5/edit

This is now the pattern
 /[s\.]*(prop|evar)(7[0-5]{1}|[1-6]{1}[0-9]{1}|[0-9]{1})$/ig
0

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
RobOwner (Aidellio)Commented:
Note that pattern will not match leading zeros
0
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
JavaScript

From novice to tech pro — start learning today.