DW (dreamweaver) Regular Expression Function List _ regular expression

Source: Internet
Author: User
Tags alphanumeric characters dreamweaver
Just used teleport Pro pull a whole station to the local all the chain is forced to add a tppabs= "..." The new system and Dreamweaver 8 have played a replacement of the DW search scope: The entire current local site search: Source code Lookup: \btppabs= "h [^ "]*" Replace: (empty) tick: Replace all buttons with regular expression points ok~~ fix ~ ~

Example 2: The inside contains parentheses, single quotes, etc.

Find: href= "javascript:if\ (confirm\ (. *?) ' \) \ window\.location= ' (. *?) ' "
Replace: $


Later, the cloud-dwelling community also shared an article, introducing the regular of the DW more detailed, guess you would like Dreamweaver regular expression character lookup substitution method ($1,$2 usage description)

Another: attached DW regular expression table
"

Character

The

Example

^

Enter or start part of line.

^t match "T" but does not match

$

h$ match The twffan=

*

the

0

um* "Rum" "um" "huge" "U"

+

the

1

um+ "Rum" "um" "huge"

st?on matching "son" "ston"

.an "bran muffins can be tasty" and "can" "

x|y

x Y

ff0000 |0000FF matching bgcolor= "#FF0000" font color=" #0000FF "

{n}

n

o{2} matching "O" "money"

{n,m}

at least n m

matching "FF" "F"

[abc]

[abcdef]

[^abc]

[^a-f] [^abcdef]

"Orange" "B" " K "

\b

\bb "Goober"

\b

\bb "book"

\d

\d matching "2"

\d

Any non-numeric character. is equivalent to [^0-9].

\d matches "Q" in " S" and "Q45 " in "900S "

\f

Page breaks.

\ n

Line feed.

\ r

The carriage return character.

\s

\sbook "book" "notebook"

\s

Any single non-white-space character.

\sbook matches "book " in "Notebook" , but there are no matches in "Blue Book"

\ t

Tabs.

\w

b\w* matching "barking" and "BLACK"

\w

Any non-alphanumeric character. is equivalent to [^a-za-z0-9_].

\w matches the "Jake&mattie" in the


Find all hyperlinks, excluding http://and already available/
\shref\s*=["'][^ (HTTP) (/)]

href\s*=['][^ (HTTP) (/)]

href\s*= (["']) ([^ (HTTP) (/)])


Href=$1/$2


A regular expression replaces or adds something to a different content

For example, we want to add <a href= ' wholesale-wedding-dresses.html ' > to a
You need to group the data you are looking for in the lookup box in parentheses, such as href\s*= (["'])" ([^ (HTTP) (/)])
Let's use href=$1/$2 in the replacement box.

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.