Skip to main content
Known Participant
April 1, 2020
Question

How to Find/Replace (also using Wildcards)

  • April 1, 2020
  • 1 reply
  • 663 views

This is somewhat of a two-parter. I have an XML file that has many lines that look like this:

 

<something id="54875" source="something.me">
<code>./random/text/here.html</code>
<morecode>./more/random/text/here.html</morecode>
</something>

 

This snippet above repeats sevearl hundred times. I need to find all the instances where the <code> and <more> lines apear, then add a third line under it so it looks like this:

 

<something id="54875" source="something.me">
<code>./random/text/here.html</code>
<morecode>./more/random/text/here.html</morecode>

<addedcode>./added/random/text/here.html</addedcode>
</something>

 

Furthermore, each snippet has unique text between the brackets. So I'll need to use a wildcard so it ignores anything written inside the <code> and <more>, so I can go line by line copy/pasting the replacment text.

 

How can I easily do this in Dreamweaver (or another app if needed)?

This topic has been closed for replies.

1 reply

Nancy OShea
Community Expert
Community Expert
April 1, 2020
  1. Ctrl + Shift + F to Find.
  2. Search for <code> in entire local site.
  3. Hit Find All button.
  4. In the Search results panel (F7), double-click an item to open that document.
  5. Edit as required.
  6. Repeat with other Search results.

 

 

Nancy O'Shea— Product User & Community Expert
Known Participant
April 1, 2020

Thanks for the quick reply. One issue is that the "./random/text/here.html" between the code is always different. So I need to insert a wild card here so it ignores those lines and just pulls up all the instances for the code line. Otherwise it's only going to return a search for that one line with that specific text. Know what I mean?

Nancy OShea
Community Expert
Community Expert
April 1, 2020

No, I don't know what you mean.  Don't over complicate this. Just search for <code> without any text.

 

Nancy O'Shea— Product User & Community Expert