Page 1 of 1

Conditional Subpatterns

Posted: Wed May 05, 2021 12:44 pm
by othnijavier
Hello everybody

I want to run some filters in a bunch of XML files only if there is some line in the file that does NOT contain a value/string out from a list of a few values.

Is this where I use conditional subpatterns? Can somebody give me examples or a better way to do what I want?

Thank you

Re: Conditional Subpatterns

Posted: Fri Jun 11, 2021 2:29 pm
by DataMystic Support
Hi there,

How large is the XML content? You can use an EasyPattern like this:

Code: Select all

[ 0+ chars,
'value1' or 'value2' or 'value3',
longest 0+ chars ]
And set the replace with to

Code: Select all

$0
You can then add subfilters which trigger only when the match occurs.