Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all!

I am not good at regular expression at all and I have a problem. I want to write a reg exp that from a given string(url) just to look if the string includes any of the: job/careers/hr/sitemap (not exact word).

I ended up with: "/^(.*)[job|career|hr|sitemap]+/i(.*)$/"

That is not correct and gives me an error.... (unknown modifier '(' )
Please help on this. :( Thank you in advance. Regards
Posted
Updated 17-Jun-10 10:35am
v2

1 solution

There are numerous regex builder tools, you can use any one.
try this:
Regex Builder[^]

They help a lot in avoiding such errors!

BTW: It doesn't look like error reported by you is becuase of this Regex. It's probably because of the way you must have used it. regex looks fine - No error in it.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900