The Replace feature of Dreamweaver 8

Source: Internet
Author: User

the Replace feature of Dreamweaver 8

Here's how you can remove these redundant code with the Dreamweaver 8 replacement feature.

Look in: folder (then select the folder you want to replace)

Search: Source code Lookup: \btppabs= "h[^"]* "

Replace: (empty)

TICK: Use regular expressions

Click the Replace All button, OK, all done.

For example, use regular expressions to remove the links below

<a href= '/tags.php?/123.html/' class= ' tagc1 ' > Solar instruments </a>

Search: Source code Lookup: <a\s*href= (' | "). *?>

Replace: (empty)

TICK: Use regular expressions

Click the Replace All button, OK, all done.



Find all connections: \<a href *= *[' "]* (\s+) [" '].*\> (. [                          ^\<]*)? <a\s*href= (' | '). *?</a>

If you are deleting all of the links above

Search: Source code Lookup: <a\s*href= (' | "). *?</a>

Replace: (empty)

TICK: Use regular expressions

Click the Replace All button, OK, all done.

Use regular expressions in Dreamweaver to replace the contents of the HREF, just as the contents of the href below are complex and diverse, href= "/html/u.html", href= "/fillseo/huko.html", Want to replace them all with href= "#", as follows:

Find:
\href= "[^"]* "
To be replaced by:
href= "#"

(#为替换后的内容, can be changed as needed!) Be sure to tick: use regular Expressions (X))

The above is only the general content of the replacement href, because there are many tags have href attribute, such as a, link, etc., if you just want to replace the content of a tag, you can do this:

Find:
<a \href= "[^"]* "
To be replaced by:
<a href= "#"

(Note the relative position of a and href, not copy, can extrapolate)

How do I use DW to delete hyperlinks on a webpage?

I have been looking for a long time, not on the Internet. So come and share it.

Open Find Replacement:

Find href= "([\s\s]*?)" //([\s\s]*?) represent any content

Replace with href= "#"

OK, Fix it.

The replacement functionality for Dreamweaver 8

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.