Make sure the regex subpattern doesn't contain the previous subpattern?
I am wondering if there is a way to check if the subpattern matches a given sequence so that I can block it.
For example, let's say that I wanted to capture everything except a repeat of an earlier capture. So if I had a suggestion
[word plus word]
, the next would have to log everything (
) up to the second occurrence
The first is
. The second capture group
tries to exclude it (it was previously marked
), but it only works on characters, not subpanel captures.
Is there anyway to do this?
source to share