Using `grep`
$ grep -E "^'ABC'\|[^|]*\|'(Y|N)'\|'[[:alpha:]]+/" input_file
'ABC'|filler|'Y'|'john/1'|'text'
'ABC'|filler|'N'|'mary/2'|'text'
Using `grep`
$ grep -E "^'ABC'\|[^|]*\|'(Y|N)'\|'[[:alpha:]]+/" input_file
'ABC'|filler|'Y'|'john/1'|'text'
'ABC'|filler|'N'|'mary/2'|'text'