Dreamweaver using regular technology to search for regular expressions

Source: Internet
Author: User
Tags dreamweaver
Copy Code code as follows:

<a href= (\s) +_ (\s) +
<a href=$1-$2
<a href= ((\s) +\_) +
<a href= ($1+\-) +
<a href= "(\s) +\_ (\s) +"
<a href= "(\s) *\_ (\s) *"
<a href= "(\w) +\_ (\w) +"
<a href= "(\s*) \_ (\s*)"
<a href= "$1-$2"

Regular expressions
Regular expressions are patterns that describe character combinations in text. Using them in code Search helps to describe concepts such as "start with ' var" and "attribute values that contain numbers." For more information about searching, see searching for and replacing tags and properties.

The following table lists the special characters, their meanings, and usage examples that are used in regular expressions. To search for text that contains a particular character in the table, append a backslash to the special character to "escape" it. For example, to search for an actual asterisk in the some conditions apply* phrase, your search pattern should resemble: apply\*. If you do not escape the asterisk, you will find all occurrences of "apply" (and all occurrences of "appl", "Applyy", and "applyyy"), not just those matches with an asterisk later.

Use parentheses to separate the groupings that you want to refer to in the regular expression. Then use $, $, $, and so on in the Replace field to refer to the first, second, third, and subsequent parentheses groupings.

Attention

Use \1, \2, \3, and so on in the Find what text box (instead of $, $, $) to refer to the earlier bracket groupings in the regular expression.


For example, by searching (\d+) \/(\d+) \/(\d+) and replacing it with $2/$1/$3, you can swap days and months in a slash-delimited date (so you can convert between the American style date and the European style date).

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.