How to carry over information in a Find/Replace

Questions about XML that are not covered by the other forums should go here.
obmark3
Posts: 2

How to carry over information in a Find/Replace

Fri Jul 06, 2018 1:53 am

I have content within a tag that I need to retain in the output text, but don't know the proper syntax. I used to do this easily with FSR but don't have a 64 bit version.

Input text:
<wd.headnote jur.group="sct" year="1963">

Output text:
<wd.headnote jur.group="sct" year="1963"><note.text>

The year is the value that changes throughout the file, so I need it to carry over.

Please advise.

Thanks!

Mark
Radu
Posts: 5577

Re: How to carry over information in a Find/Replace

Fri Jul 06, 2018 8:11 am

Hi Mark,

In the Oxygen Find/Replace dialog check the "Regular Expression" checkbox, search for:

Code: Select all

(<wd.headnote jur.group="sct" year="\d+">)


and replace with:

Code: Select all

$1<note.text>


Or if you want to work XML-aware, in the Oxygen Tools main menu ->"XML Refactoring" dialog there is a "Wrap Element Content" operation.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
obmark3
Posts: 2

Re: How to carry over information in a Find/Replace

Fri Jul 06, 2018 9:44 pm

Much thanks!

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests