Find and Replace using Wildcards

Explorer ,
May 31, 2011 May 31, 2011

Copy link to clipboard

Copied

I am following the procedure outlined in Trent’s Blog:

http://www.trentmueller.com/blog/search-and-replace-wildcard-characters-in-dreamweaver.html

This is fantastic stuff and will really help me.

I have a few (but only a few) times had success.

It says to “Use regular expression.”  What does that mean?  What is an “irregular expression?”  I have tried with the box checked and unchecked.  Usually with the box checked it will not Find my string.  I uncheck the box and it sometimes does.

Example:

Link to    www.schembs.com/TEST_jds_1.html

At the moment all the Cases are identical.  I have not uploaded the .css to the site so the right-most formating is not properly displaying.  It does work when the .css is available.

In the source code I literally copy the line of code:

<p class="type_X"><u>Joh. Heinrich Sch&ouml;m (1713-1785) <span  class="right-most">1.</span></u></p>

and paste it into the Find box of F&R.  I then put my cursor above the line and it does not Find it, giving me the “Done.  Not found in current document.” response.  I uncheck the “Use regular expression” box and it will find it.

THEN,

I try using a wildcard (with the box checked), Finding:

<p class="type_X">([^<]*)< p>

or

<p class="type_X">[^”]*< p>

and it will find the misc. lines, e.g. where the text is “Case #1”, but not the lines of interest, with Heinrich’s name.  With the box unchecked it Finds nothing.

Really would appreciate help.  Thanks.

jds

Views

26.9K

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
community guidelines

correct answers 1 Correct Answer

LEGEND , Jun 01, 2011 Jun 01, 2011
jds zigzag wrote:It says to “Use regular expression.”  What does that mean?
A regular expression is a pattern for matching text. It uses a combination of literal characters and special symbols or sequences of characters (technically called metacharacters or metasequences) to represent such things as the beginning and end of a line or any alphanumeric character. For example, \d represents any number (single digit), \d* represents zero or more numbers in sequence.I have written a tutorial series ...

Likes

Translate

Translate
Most Valuable Participant ,
Jun 01, 2011 Jun 01, 2011

Copy link to clipboard

Copied

It says to “Use regular expression.”  What does that mean? 

http://www.regular-expressions.info/

Mylenium

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
community guidelines
LEGEND ,
Jun 01, 2011 Jun 01, 2011

Copy link to clipboard

Copied

jds zigzag wrote:

It says to “Use regular expression.”  What does that mean?

A regular expression is a pattern for matching text. It uses a combination of literal characters and special symbols or sequences of characters (technically called metacharacters or metasequences) to represent such things as the beginning and end of a line or any alphanumeric character. For example, \d represents any number (single digit), \d* represents zero or more numbers in sequence.

I have written a tutorial series on using regular expressions in Dreamweaver here: http://www.adobe.com/devnet/dreamweaver/articles/regular_expressions_pt1.html.

I try using a wildcard (with the box checked), Finding:

<p class="type_X">([^<]*)< p>

or

<p class="type_X">[^”]*< p>

They're not wildcards, but regular expressions. The first part matches the literal characters <p class="type_X">. The next sections use metacharacters.

([^<]*) matches zero or more characters (and as many as possible) that don't include an opening angle bracket (<). The parentheses "capture" the value that's matched so it can be used in a replace sequence.

[^"]* matches zero or more characters (and as many as possible) that don't include a double quote. There are no parentheses, so the value is not captured for reuse.

The closing <p> matches those literal characters.

Regular expressions are not easy, but they're extremely powerful, and a good skill to acquire.

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
community guidelines
Explorer ,
Jun 01, 2011 Jun 01, 2011

Copy link to clipboard

Copied

LATEST

Your reply was very helpful.  Unfortunately I concluded that I could only use the Wildcard capability in some of the cases.  There are too many permutations of the raw callouts that the scripts get too complicated -- one had fourteen wildcards.  I am guessing that if one were more expert, there are ways of writing more advanced scripts and solving it that way.  But only using it as a novice it will be very helpful.  The rest of my work will be brute force.  Thanks.

jds

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
community guidelines