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

Find & Replace Question

Participant ,
Jan 17, 2020 Jan 17, 2020

Copy link to clipboard

Copied

How might I tell Dreamweaver (version 20) to go thru the current page & find all of the "-" hyphen characters that are located inside ALT attributes inside IMG tags. Very similarly then I need to do the same with the TITLE attributes.

 

Untitled-1.gif

 

The nearest which I can conceive is shown in this image. The top portion seems correct but then I do not see any options in the Action area which would allow me to specify to remove the "-" hyphen.

 

Untitled-2.gif

 

Thanks.

TOPICS
Code , How to

Views

599

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 ,
Jan 17, 2020 Jan 17, 2020

Copy link to clipboard

Copied

You will need a Regular Expression for this. And I'm RegEx challenged.

 

 

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
Participant ,
Jan 17, 2020 Jan 17, 2020

Copy link to clipboard

Copied

Thanks. I am also RegEx challanged.

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
Participant ,
Jan 17, 2020 Jan 17, 2020

Copy link to clipboard

Copied

Looking thru the help documentation it is easy to understand how one would be RexEx challanged.


"Causes certain characters and short strings (such as ?, *, \w, and \b) in your search string to be interpreted as regular expression operators. For example, a search for the b\w*\b dog will match both the black dog and the barking dog."

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 ,
Jan 20, 2020 Jan 20, 2020

Copy link to clipboard

Copied

Without RegEx, this can still be done in any version of DW that allows you to select multiple lines by holding Ctrl while dragging code (CC2019+)

1. Select your code, using Ctrl/Cmnd+Drag to highligh multiple lines
2. Use the Find in Current Document function (Cmnd/Ctrl+F) not the Find & Replace in Files option (Cmnd/Ctrl+Shift+F)).
It will open a single text field across the bottom of your open document.
3. Click the small arrow to the left of the text field that opened. that will reveal the Replace field
4. Add a hyphen to the top field and a space to the bottom
5. Hit the Replace All button
6. Rinse and repeat for all of your hyphenated blocks of text.

Note: if all of your text blocks are very similar, where only the last two characters are different like your screenshot, you can select the text that is the same across all of them in the first instance, then hit Ctrl+Shift+F3 to select all copies of that text across the entire document, then do the F&R as noted above.

It's a lot slower than RegEx, but without having someone create the search for you, this is probably the fastest option.

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
Participant ,
Jan 20, 2020 Jan 20, 2020

Copy link to clipboard

Copied

LATEST

Thanks all,

I'll give that a try.

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