• 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 search and replace a link with similar code?

Community Beginner ,
Dec 14, 2023 Dec 14, 2023

Copy link to clipboard

Copied

Hi,

I still use Dreamweaver 8 😉

I want to delete many, many links to amazon (including the word "amazon"). They look like this:

<a target="_blank" href="https://www.amazon.de/gp/search?ie=UTF8&tag=USERNAME&linkCode=XXXXX&camp=XXXXX&creative=XXXXX&index=sports&keywords=XXXXX" style="color:#999">amazon</a>

These "XXXXX" are always different.

How do I search&replace/delete them right?

Do I have to search for sourcecode oder text or text (extended) oder specific tag?

Can I use wildcard like " * "?

Didn't find a way 😞

THANKS from Germany!!!

Views

355

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

correct answers 1 Correct answer

Community Expert , Dec 18, 2023 Dec 18, 2023
quote

(<a[^>]*>amazon</a>)

That will only select anchor tags with the word 'amazon' as the link text.

By @osgood_

 

Sorry to jump on the bandwagon only now, @osgood_ 's proposal is very good, except that the emerging part of the link must exactly be equal to amazon and containing it, if so, so far so good (no pun intended 😉 )

 

On the other hand, @Uwe27891862d8tv if your text links could be sometimes differents, it's highly likely that your links themselves contain the word amazon in their url, so

...

Votes

Translate

Translate
LEGEND ,
Dec 14, 2023 Dec 14, 2023

Copy link to clipboard

Copied

 

Back up you work folder first!!!

 

Try:

(<a[^>]*>.*?</a>)|amazon

 

Edited: Actually that will just find every <a></a> tag on the page..........so you may not want to try that!

 

This is what you want:

(<a[^>]*>amazon</a>)

 

That will only select anchor tags with the word 'amazon' as the link text.

 

 

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 ,
Dec 16, 2023 Dec 16, 2023

Copy link to clipboard

Copied

That's it, osgood_!

Thank you very much!!!

 

@Nancy OShea Thanks for your hint, I know what you mean. But I don't youse it in productivity environment.

I used DW8 many many years ago ... and still use it sometimes for little changes. It doesn't make sence to buy/use new software for my purpuses.

I hope, that's ok for you 😉

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 ,
Dec 18, 2023 Dec 18, 2023

Copy link to clipboard

Copied

quote

(<a[^>]*>amazon</a>)

That will only select anchor tags with the word 'amazon' as the link text.

By @osgood_

 

Sorry to jump on the bandwagon only now, @osgood_ 's proposal is very good, except that the emerging part of the link must exactly be equal to amazon and containing it, if so, so far so good (no pun intended 😉 )

 

On the other hand, @Uwe27891862d8tv if your text links could be sometimes differents, it's highly likely that your links themselves contain the word amazon in their url, so for my part, I'd suggest filtering by URL instead

 

<a[^>]*href="[^"]*amazon[^"]*"[^>]*>.*?<\/a>

 

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 ,
Dec 14, 2023 Dec 14, 2023

Copy link to clipboard

Copied

DISCLAIMER: 

It's nearly 2024.  As an unpaid forum volunteer and product user, I no longer field questions about OBSOLETE software from the early 2000s.  If customers cannot see fit to upgrade their tools for compatibility & security reasons,  that's their cross to bear, not mine.  

 

MODERN OPTIONS:

-- Adobe Dreamweaver CC - https://www.adobe.com/products/dreamweaver.html
-- Codespaces (free, browser-based) - https://github.com/features/codespaces
-- Nova (Mac only, formerly called Coda) - https://nova.app/
-- Pinegrow - https://pinegrow.com/
-- Sublime Text - http://www.sublimetext.com/
-- Visual Studio Code (free) - https://code.visualstudio.com/
-- Wappler ~ Visual Web App Builder - https://wappler.io/

Good luck.

 

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
LEGEND ,
Dec 14, 2023 Dec 14, 2023

Copy link to clipboard

Copied

quote

DISCLAIMER: 

It's nearly 2024.  As an unpaid forum volunteer and product user, I no longer field questions about OBSOLETE software from the early 2000s.  If customers cannot see fit to upgrade their tools for compatibility & security reasons,  that's their cross to bear, not mine.  

 

 

By @Nancy OShea

 

It was a general question which would be applicable to any program that has a find and replace option, new or old. Theres no security or compatibility issues here. Thats like saying I'm not answering your question because you're driving a 1960s car. Of course it's your call but a little strange in the circumstances.

 

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 ,
Dec 14, 2023 Dec 14, 2023

Copy link to clipboard

Copied

I'm sorry but DW8 is the least reliable tool one could use.  I have no faith in it, especially when modern tools are freely available.

https://blog.devsense.com/2022/find-and-replace-with-regexp

 

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
LEGEND ,
Dec 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

quote

I'm sorry but DW8 is the least reliable tool one could use. 


By @Nancy OShea

 

In what sense.. Its just an editor, granted a bit out dated. If the OP was asking about server behaviours, fluid grid, spry etc l would agree, it's time to move on. The question was about find and replace............no problem l just immediately thought it was a puzzling response but of course you are entitled to express your opinions.

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 ,
Dec 18, 2023 Dec 18, 2023

Copy link to clipboard

Copied

quote

I'm sorry but DW8 is the least reliable tool one could use.  I have no faith in it

By @Nancy OShea

 

@Nancy OShea , do you think DW8 can open security holes using Regex?... Seeing as you're so thoughtful about such a position, I suppose so... could you tell us a little more about it?

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 ,
Dec 18, 2023 Dec 18, 2023

Copy link to clipboard

Copied

LATEST

@L e n a 

I can't be sure if DW8 is on compatible equipment and an old OS —  Windows® 2000, Windows XP and Macintosh Mac OS® X 10.3 and 10.4. with the required 8.0.2 update.  Is it stable?  I don't know. There are too many unknowns. 

 

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 Expert ,
Dec 14, 2023 Dec 14, 2023

Copy link to clipboard

Copied

Advanced Find & Replace (Ctrl + Shift + F) in Dreamweaver CC can do this without REGEX.   See screenshot.

 

image.png

 

You can try the current version of Dreamweaver CC free for 7 days. 

NOTE:  After 7 days it reverts to a paid 12 month subscription if you don't cancel.

https://www.adobe.com/products/catalog.html

 

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
LEGEND ,
Dec 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

That's certainly a useful addition to one's bag but it doesn't mean an older version of an editor can't manage the situation if needed and is the only option available. I guess lm not impressed these days at the lack of knowledge and experience which has been substituted by automation, in my opinion making us zombies. Its no wonder GENZ cannot do anything without a phone attached to their hand 24/7..........the brain is shrinking with each new gen.

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 ,
Dec 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

quote

I guess lm not impressed these days at the lack of knowledge and experience which has been substituted by automation, in my opinion making us zombies.

By @osgood_

===========

image.png

 

For the record, I know how to drive a car manually with stick shift & clutch but my CURRENT vehicle is automatic.  🙄  Just saying...

 

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
LEGEND ,
Dec 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

quote
quote

I guess lm not impressed these days at the lack of knowledge and experience which has been substituted by automation, in my opinion making us zombies.

By @osgood_

===========

image.png

 

For the record, I know how to drive a car manually with stick shift & clutch but my CURRENT vehicle is automatic.  🙄  Just saying...

 


By @Nancy OShea

 

 

'they don't make them like they used to'...........true or false. I guess that's in the eye of the beholder.

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 ,
Dec 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

quote

'they don't make them like they used to'...........true or false. I guess that's in the eye of the beholder.

By @osgood_

=======

I knew a crazy guy (a Vietnam war vet) who was so angry with the telephone company he fired a gun at his rotary phone.  A while later, he lifted the receiver & heard a dial tone, so he shot his phone again. 🤣

 

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