Link to home
Start Free TrialLog in
Avatar of Yann Shukor
Yann ShukorFlag for France

asked on

REGEX inverse string selection

Hi

I'm trying to create a template  using a REGEX rule to discard the last twenty four characters (" action=allow cache=MISS") of the following string when RSYSLOG receives notifications that contain the undesired sequence:
192.168.22.167 GET http://clients3.google.com/generate_204 action=allow cache=MISS

Open in new window

I can select the sequence using /( action=allow cache=MISS)/g but I can't find the solution to invert the selection in order to retain only the first part of the notification message
any ideas ?
thanks
yann
Avatar of Bill Prew
Bill Prew

Where are you using the regular expression?  SED?

You want to keep everything else on the line, and will that be the entire line?


»bp
SOLUTION
Avatar of Bill Prew
Bill Prew

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
ASKER CERTIFIED SOLUTION
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 Yann Shukor

ASKER

Your scoring system really isn't flexible at all
I unfortunately assigned the score to the wrong answer and now I can't change that