Regex to represent "NOT" in a group
- by Joe Ijam
I have this Regex;
<(\d+)(\w+\s\d+\s\d+(?::\d+){2})\s([\w\/.-])(.)
What I want to do is to return FALSE(Not matched) if the third group is "MSWinEventLog" and returning "matched" for the rest.
<166Apr 28 10:46:34 AMC the remaining phrase
<11Apr 28 10:46:34 MSWinEventLog the remaining phrase
<170Apr 28 10:46:34 Avantail the remaining phrase
<171Apr 28 10:46:34 Avantail the remaining phrase
<172Apr 28 10:46:34 AMC the remaining phrase
<173Apr 28 10:46:34 AMC the remaining phrase
<174Apr 28 10:46:34 Avantail the remaining phrase
<175Apr 28 10:46:34 AMC the remaining phrase
<176Apr 28 10:46:34 AMC the remaining phrase
<177Apr 28 10:46:34 Avantail the remaining phrase
<178Apr 28 10:46:34 AMC the remaining phrase
<179Apr 28 10:46:34 Avantail the remaining phrase
<180Apr 28 10:46:34 Avantail the remaining phrase
How to put " NOT 'MSWinEventLog' " in the regex group ([\w\/.-]*) ?
Note :
The second phrase above should return "not matched"