Conditional Subpatterns

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Post Reply
othnijavier
Posts: 1
Joined: Sun Apr 04, 2021 4:51 am

Conditional Subpatterns

Post by othnijavier » Wed May 05, 2021 12:44 pm

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

User avatar
DataMystic Support
Site Admin
Posts: 2238
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Conditional Subpatterns

Post by DataMystic Support » Fri Jun 11, 2021 2:29 pm

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.
Regards,

Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads

Post Reply