Link to home
Start Free TrialLog in
Avatar of paddycobbett
paddycobbett

asked on

I need a regular expression to distinguish two similar words

Hi, I can't track down some annoying popup in my javascript code. Can someone provide me with a regular expression to match the word "alert" but which does NOT match szalert.

so:

alert('debug 1'); // match!
szalert('debug 1'); // should NOT match

thanks
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of paddycobbett
paddycobbett

ASKER

Awesome that did it thanks!
You're welcome. Glad I could help!