Sample Header Ad - 728x90

Find lines with first word containing a certain set of letters

1 vote
4 answers
736 views
The input file exists out of lines containing multiple 10-letter combinations: NGNAEAREAX EAHVSELYCI FNWGNLACQM AWKLRMDHIT PRYMFNYMVM NCNREDEEEQ EAHVSELYCI FNWGNLACQM AWKLRMDHIT PRYMFNYMVM I need a regex (PCRE or BRE/ERE) that finds all lines of which the first word contains the letters to form the word "REGEX". So the first word of the line has to contain at least 1 R, 2 E's, 1 G and 1 X. So the output of the above would be: NGNAEAREAX EAHVSELYCI FNWGNLACQM AWKLRMDHIT PRYMFNYMVM
Asked by Tomyy (155 rep)
Oct 21, 2022, 10:47 PM
Last activity: Nov 4, 2022, 07:37 AM