We receive a file daily with thousands of lines of data. Occasionally, a few lines will be messed up, causing an automated process to fail. When this happens, it can be difficult to find the errors.
I'd like to use a regular expression to find anything not conforming to the files usual structure. All lines are supposed to look like the following:
ABC|SomeText|MoreText
DEF|SomeText|MoreText
ABC|SomeText|MoreText
GHI|SomeText|MoreText
DEF|SomeText|MoreText
So a regex that flags lines that don't begin with 3 letters and a pipebar. In the below example, it would flag line 3.
ABC|SomeText|MoreText
DEF|Some
Text|MoreText
ABC|SomeText|MoreText
GHI|SomeText|MoreText
DEF|SomeText|MoreText
Any help would be appreciated, I've been struggling with this for a while.
Many thanks