Can I use Find/Replace in Files to find files that do NOT contain a string?

Oxygen general issues.
gwswicord
Posts: 2
Joined: Tue Apr 30, 2024 3:43 pm

Can I use Find/Replace in Files to find files that do NOT contain a string?

Post by gwswicord »

Hi,
I am working with library catalog metadata and we need to identify items from a set of almost 40,000 that do not contain a specific value, e.g. "UFIR" in <mods:aggregation></mods:aggregation>. Some suggestions I found online pointed to using regex but none of the offered examples worked. Any help would be very much appreciated.
Regards, G.W.
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Can I use Find/Replace in Files to find files that do NOT contain a string?

Post by Radu »

Hi,
I would probably attempt to use XPath for this.
The Oxygen XPath toolbar has a drop down in which you can decide to run the XPath over multiple files or over the entire project.
For example I might try an XPath like this:
//*:aggregation[not(contains(text(), 'UFIR'))]

https://www.oxygenxml.com/doc/versions/ ... xv_cgk_54b

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply