Search and replace using regex and xpath
Posted: Wed Jul 17, 2019 11:07 am
Hi there,
I need to add a bold tag (b) to callout numbers that have the form (1), (2), (n).
The regex would be something like:
The tag has already been applied without consistency, so I'm trying to finish the job so to speak. But I don't want to apply the tag if it's already there.
Since Oxygen can do a search and replace using Xpath, I looked at how to restrict the search and replace to callouts that don't already have the tag. It would look something like:
I'm kind of missing the next step: how to actually perform the search and replace operation?
Thank you for your help.
I need to add a bold tag (b) to callout numbers that have the form (1), (2), (n).
The regex would be something like:
Code: Select all
\(\d+\)
Since Oxygen can do a search and replace using Xpath, I looked at how to restrict the search and replace to callouts that don't already have the tag. It would look something like:
Code: Select all
[not(ancestor::b)]
Thank you for your help.