Highlighted

Find & Replace Question

Explorer ,
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

447

Likes

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

Find & Replace Question

Explorer ,
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

448

Likes

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

Copy link to clipboard

Copied

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

 

 

Nancy O'Shea, ACP
Alt-Web.com

Likes

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
Reply
Loading...
Explorer ,
Jan 17, 2020

Copy link to clipboard

Copied

Thanks. I am also RegEx challanged.

Likes

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
Reply
Loading...
Explorer ,
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."

Likes

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
Reply
Loading...
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Explorer ,
Jan 20, 2020

Copy link to clipboard

Copied

Thanks all,

I'll give that a try.

Likes

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
Reply
Loading...