SoFunction
Updated on 2025-04-09

Search using regular technology in DreamWeaver

Copy the codeThe code is 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 describe concepts such as "line starting with 'var'" and "property value containing numbers". For more information about search, see Searching and Replacing Tags and Properties.

The following table lists examples of special characters used in regular expressions, their meanings and usage. To search for text that contains a special character in the table, append a backslash to the special character and make it "escape". For example, to search for the actual asterisk in the some conditions apply*  phrase, your search pattern should be similar to: apply\*. If you don't escape the asterisk, you will find all matches for "apply" (and all matches for "appl", "applyy", and "applyy"), not just those matches followed by the asterisk.

Use brackets to separate the groups to refer to in the regular expression. Then use $1, $2, $3, etc. in the "replacement" field to reference the first, second, third and later bracket grouping.

Notice

Use   \1, \2, \3, etc. (rather than  $1, $2, $3) in the Find Content text box to reference earlier bracket groupings in regular expressions.


For example, by searching for  (\d+)\/(\d+)\/(\d+)  and replacing it with  $2/$1/$3, you can swap the day and month in a date separated by a slash (so it can be converted between a US style date and a European style date).