I know that a similar question to this has been asked before but I couldn't get that solution to work. It's this one
Regular expression to match a line that doesn't contain a word?
Here's the text
ID Type Code Test Name Dept Date --- Time --- By
---- ---- ---------- ------------------------- ------ -------- --------
01 S 10231AB=,+ Test1 With Spaces 20180913 1:08 AM ENIG01
02 S %SBTEX1 Test2 With Spaces 20180912 10:02 AM MYR001
03 B 6399AB= Test3 With Spaces 20180912 12:07 AM WDHLSY1
04 S 4848AB=,4+ Test4 With Spaces 20180912 12:07 AM WDHLSY1
05 S 899AB=,+ TSH+ 20180913 1:08 AM ENIG01
06 S 899AB=,+ TSH+
Lines 1 and 2 are not a match because the contain the text "10231" and "%SBTEX1".
Line 5 is the match.
Line 6 is not a match because it does not have a string of digits such as "20180913" followed by the date and time.
I tried but could not even come up with a regular expression that matched all of the lines of code except for line 6.
Here's the Regex that is in the post mentioned above. It excludes a line of code that contains a word.
^((?!hede).)*$
The Question:
A big shout out to Wiktor Stribiżew who solved my original question. But I had omitted some text and when I tried to implement his solution, I realized the problem was more complicated than I had initially thought.
If you would like to see his solution to the original question, please visit the link below.
Wiktor's Solution To The Original Question
Wiktor if you could. Please post your solution on RegexStorm.Net/Tester again, that was amazing!
Thank you,
Mark S.