0

I have some links:

utmcsr=rdstation|utmccn=curso-intro-coaching|utmcmd=inbound|utmctr=link3
utmcsr=rdstation|utmccn=agenda-psc|utmcmd=email
utmcsr=rdstation|utmccn=pnl-porto-alegre

I want to build a regex expression that matches the rdstation not followed by inbound OR email.

I've tried rdstation(?!(email|inbound)) but it doesn't worked.

  • This works `^.*?rdstation(?>.*?(?:inbound|email)(*SKIP)(*FAIL)|.+)` –  May 26 '17 at 15:13

1 Answers1

1

The problem is that your negative lookahead is anchored to the position directly after rdstation. It would only exclude strings like this:

rdstationemail asdf 123 4

You need to make sure it can match anywhere after rdstation:

rdstation(?!.*(email|inbound))

Working example here.