Exclude option from search in files
Are you missing a feature? Request its implementation here.
-
- Posts: 3
- Joined: Fri Feb 02, 2018 12:41 pm
Exclude option from search in files
Post by gilles_charon »
Hi,
I often need to search files which not contain a specific text or pattern.
It would be usefull to have an exclude option in the "search/replace in files" interface
Regards
Gilles
I often need to search files which not contain a specific text or pattern.
It would be usefull to have an exclude option in the "search/replace in files" interface
Regards
Gilles
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Exclude option from search in files
Hi,
Other than Linux/Unix command line tools (grep, ack), I haven't seen a tool (especially GUI tool) that supports an exclude string (files without match) search.
Anyway, I've logged a feature request for such an option on our issue tracking tool.
Meanwhile, for XML files you could use an XPath 3.0 (or XQuery 3.0) expression in the XPath/XQuery Builder view to locate such files that do not contain a specific string: Replace exclude_string with whatever text the files should not contain.
This isn't really lightweight, but it should work. Do note that this can only be used on well-formed XML files.
Regards,
Adrian
Other than Linux/Unix command line tools (grep, ack), I haven't seen a tool (especially GUI tool) that supports an exclude string (files without match) search.
Anyway, I've logged a feature request for such an option on our issue tracking tool.
Meanwhile, for XML files you could use an XPath 3.0 (or XQuery 3.0) expression in the XPath/XQuery Builder view to locate such files that do not contain a specific string:
Code: Select all
for $x in collection('file:/path/to/my/folder?select=*.xml')[not(contains(unparsed-text(base-uri()),'exclude_string'))]
return $x
This isn't really lightweight, but it should work. Do note that this can only be used on well-formed XML files.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Fri Feb 02, 2018 12:41 pm
Re: Exclude option from search in files
Post by gilles_charon »
Hello,
Thank you for your reply.
I've tried this with an element name -> [not (descendant::element)]
Not very practical, but it works.
Just a curious thing : search runs endless and every file goes out many times, always increasing...
Regards
Gilles
Thank you for your reply.
I've tried this with an element name -> [not (descendant::element)]
Not very practical, but it works.
Just a curious thing : search runs endless and every file goes out many times, always increasing...
Regards
Gilles
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Exclude option from search in files
Hi Gilles,
About this remark:
If you set its scope to some other file set, for each file in that file set the XPath will execute and will iterate the folder over and over again.
Regards,
Radu
About this remark:
The "Scope" of the XPath should be "Current File" because the XPath itself looks recursively in all files inside a certain folder.search runs endless and every file goes out many times, always increasing...
If you set its scope to some other file set, for each file in that file set the XPath will execute and will iterate the folder over and over again.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Fri Feb 02, 2018 12:41 pm
Re: Exclude option from search in files
Post by gilles_charon »
yes, of course !!! Thanks.
Regards
Gilles
Regards
Gilles
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service