condition - Regex to apply two lookbehind criteria -
I have a list of lowercase words on different lines, I want to match those lines in which the letter 'R' Where 'E' (er) is not before 'FO' (for).
Here is a sample list: >
These are the words that I want to match:
rejected Forrest fourteen
These are two regexes, each half of what I want to do:
^. (* ((? & Lt;! E) r). *) $ ^ (. * (R (? Lt ;; fo) r). *) $
'Something First match of all words except '; All other words except 'fortnight', so I want the words to match. Although in those words which are 'for' and 'er', any other matches with 'r' also. Applying a regex after the second fails to eliminate false positives.
How can I add two regexes with another condition, so that both are applied in an expression?
You use a simple change
^ \ w * (? & Lt;! E | fo)? For example, http: What does this do? (? & Lt;! E | fo)
claims that regex to e
or fo
not defined by
match character r
will match regex
Fourteen Rejects
Comments
Post a Comment