Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need some help as I have been trying to figure this out all night. I need to match the first occurrence in an article. Something like this...

The online marketing game has changed since the early 2000's. Now internet marketing is much more competitive.

How can I match only the first marketing in the article? I have this as of now.


But it's matching the word multiple times.

share|improve this question
Check, whether the regex has the "global" switch "/g". If it's of, it should only return the first matching value. What are you using to evaluate your regex? – xwoker Sep 13 '13 at 12:34
What language/tool are you using? – Jerry Sep 13 '13 at 13:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.