• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to Find/Replace (also using Wildcards)

Community Beginner ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

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)?

TOPICS
Code , How to

Views

582

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

  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 & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

LATEST

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 & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines