How to make KEYCHECK MatchesRegex And DoesNotMatchRegex?

How to make KEY CHECK MatchesRegex And DoesNotMatchRegex?

To be considered as a success if find in any place of SOURCE any of the following lines

fdgdgh4r:fe456ge | fsff | fefdgg
g5ghh5f:f4e84tger | dsfg | wertyu5f6
r48y4hs6s:f5f4gvn4 | dd4f5g | qdsdb1r86 | qw98qer9 | gdfg4d7g478r

Example SOURCE

gfdgfdh4
fdgdgh4r:fe456ge | fsff | fefdgg
g5ghh5f:f4e84tger | dsfg | wertyu5f6
gfdgfdh4df564h54h
d4hdf8h4h
r48y4hs6s:f5f4gvn4 | dd4f5g | qdsdb1r86 | qw98qer9 | gdfg4d7g478r
gdsg  45gdsgsd45 gdsgdsg45

What i want is to do Regex that at the begin of any line it most be 4+ anycharacters:4+ characters and space or more and | and anything after then end line

i tried this code ^....+:....+ +|.*$ also this code ^....+:....+ +[|].*$
But it’s not working as it considers anything success
Any help will be much appreciated it

if its just digits and letters
[A-z\d]{4}(\:|[A-z\d]+\:)[A-z\d]{4}|[A-z\d]+
or
[\w\d]{4}(\:|[\w\d]+\:)[\w\d]{4}|[\w\d]+

[ … ] = Any Order
A-z = Any Letter upper+lowercase
\d = Any digit 0-9
{4} = must match consecutive hits, can be a range β€œ3,10”, or a single number

So the above line means

[A-z\d]{4} = Match any 4 letters digits
(:|[A-z\d]+:) = Match : or additional letters and digits then :
[A-z\d]{4}|[A-z\d]+ = Match any 4 letters digits then look for more

1 Like