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
Joined: Fri Jul 06, 2018 1:48 am

How to carry over information in a Find/Replace

Post by obmark3 » 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: 6582
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » 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
Joined: Fri Jul 06, 2018 1:48 am

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

Post by obmark3 » Fri Jul 06, 2018 9:44 pm

Much thanks!

Post Reply