Prox search using tags
Posted: Thu Nov 26, 2020 1:45 am
Hi - thanks in advance for the advice. Running Oxygen 22.1
I need to replace one designation - (OS) - with a different designation (A) in *some* cases - namely when the type of the container is "flatfile". We have other OS material for which the OS designation will just be removed.
So:
<container type="flatfile">134 (OS)</container>
becomes
<container type="flatfile">134 (A)</container>
While:
<container type="port">5 (OS)</container>
becomes
<container type="port">5</container>
So my plan was to use a prox search to first replace all the 'flatfile' materials designations (searching: "flatfile OS"~10), and then do a regular search/replace with the OS to simply remove those that are left.
But I'm having some trouble with... well, all proximity searches, to be honest. I figured initially the problem was that I was asking it to find something within a tag and something in the data, but even the basic prox searches I'm doing don't seem to be working. I tried it just within data and it also wasn't working. So not I'm not sure what I'm doing wrong.
Constructed my plan/searches from the documentation:
I need to replace one designation - (OS) - with a different designation (A) in *some* cases - namely when the type of the container is "flatfile". We have other OS material for which the OS designation will just be removed.
So:
<container type="flatfile">134 (OS)</container>
becomes
<container type="flatfile">134 (A)</container>
While:
<container type="port">5 (OS)</container>
becomes
<container type="port">5</container>
So my plan was to use a prox search to first replace all the 'flatfile' materials designations (searching: "flatfile OS"~10), and then do a regular search/replace with the OS to simply remove those that are left.
But I'm having some trouble with... well, all proximity searches, to be honest. I figured initially the problem was that I was asking it to find something within a tag and something in the data, but even the basic prox searches I'm doing don't seem to be working. I tried it just within data and it also wasn't working. So not I'm not sure what I'm doing wrong.
Constructed my plan/searches from the documentation:
Any thoughts on what I'm doing wrong here? Thanks very much.Proximity Searches
Use proximity searches to find words that are within a specific distance away. To perform a proximity search, use the ~ symbol at the end of your search. For example, to search for the word Garden and the word Preparation within 6 words of each other use:
"Garden Preparation"~6