Learn how to find and replace code, text, or tags (with or without attributes) within a current document, folder, site, or across all open documents.

Use Dreamweaver’s powerful find and replace features to find and replace code, text, or tags (with or without attributes) within a current document, folder, site, or across all open documents.

You can also use powerful pattern-matching algorithms (regular expressions) for sophisticated find-and-replace operations.

Here are some of the things you can find and replace:

  • Tags, attributes, and text within code
  • Text within a selection, or multiple selections
  • Text across multiple documents, open documents, a folder, a site, or restrict the search to the currently open document
  • Use regular expressions in your search strings

You can search for text, tags, and attributes even if there is no open document in Dreamweaver.

Note:

You can do find and replace operations while working in Code, Split, and Design views. Find and replace is not supported in Live View.

In addition, export of search results is not supported.

Find and replace text in the current document

  1. In an open document, click Find > Find in Current Document, or press Ctrl + F (on Windows), or Cmd+F (on Mac) to open the Quick Find bar docked at the bottom of your current document.

    If you want to also replace text, click Find > Replace in Current Document, or press Ctrl + H (on Windows), or Cmd + Alt + F  (on Mac) to open the Quick Find and Replace bar.

  2. In the Find field, type in the text you are looking to find in the current document.

    As you type, Dreamweaver automatically highlights all instances of the search string in the current document.

    Finding text in current document
    Finding text in current document

    Note:

    Dreamweaver displays the number of instances of the found text in the Quick Find and Replace bar, and you can navigate through the results by using the Previous and Next arrows.

  3. Use the following filters to expand or limit your search:

    • Match Case: Limits the search to code/tag/text that exactly matches the case of the text you want to find. For example, if you search for the brown derby, you will not find The Brown Derby.
    • Use Regular Expressions: Causes certain characters and short strings (such as ?, *, \w, and \b) in your search string to be interpreted as regular expression operators. For example, a search for the b\w*\b dog will match both the black dog and the barking dog.
    • Match Whole Word: Limits the search to text that matches one or more complete words
    • Ignore White Spaces: Treats all whitespace as a single space for the purposes of matching. For example, with this option selected, "this text" would match "this text" but not "thistext". This option is not available when the Use Regular Expressions option is selected; you must explicitly write your regular expression to ignore whitespace. Tags do not count as whitespace. 
    • Find in Selected Text: Confines the search to the text that’s currently selected in the active document. The selected text can be a single block of text, or multiple selections of text in different places in the currently opened document. When you are searching within selected text, the found search terms are not highlighted in the document. Click Find All to display the search results in the Search panel.
    Filters to expand or limit your search
    Filters to expand or limit your search

  4. To replace found text or tags, type in the Replace field, then click Replace or Replace All.

    To walk through the found instances of the page, and replace them individually, click Replace, and use the next and previous arrows to navigate to other instances of the search term within the document.

    To replace all instances of the search term instantly, click Replace All. Dreamweaver replaces all the found instances, and provides a report of all the terms found and replaced.

    Report of replaced terms in the Search Results panel
    Report of replaced terms in the Search Results panel

Find and replace across multiple documents

You can find all search terms across multiple documents, within the folder, or within your site.

  1. Select Find > Find and Replace in Files or press Ctrl + Shift + F (on Windows), or Cmd + Shift + F (on Mac) to open the Find and Replace dialog box.

    Note:

    When Find and Replace in Files is opened for the first time, the Search in Entire Current Local Site is the default option. If you make a different selection, Dreamweaver remembers your selection and makes your selected option the default option.

  2. Type in the text in the Find text field and select any of the following options in the drop-down list:

    • Current Document - Dreamweaver searches for the specified phrase in the document that is currently in focus.
    • Open Documents - Dreamweaver searches for the specified phrase in all open documents.
    • Folder - Dreamweaver searches for the specified phrase in all the files located within the specified folder.
    • Selected Files in Site - Dreamweaver searches for the specified phrase in files that are selected from a site in the Files panel.
    • Entire Current Local Site - Dreamweaver searches for the specified phrase in the current site that you are working on.
    The Find and Replace dialog box
    The Find and Replace dialog box

  3. Use the following filters to expand or limit your search:

    • Match Case: Limits the search to text that exactly matches the case of the text you want to find. For example, if you search for the brown derby, you will not find The Brown Derby.
    • Use Regular Expressions: Causes certain characters and short strings (such as ?, *, \w, and \b) in your search string to be interpreted as regular expression operators. For example, a search for the b\w*\b dog will match both the black dog and the barking dog.
    • Match Whole Word: Limits the search to text that matches one or more complete words
    • Ignore White Spaces: Treats all whitespace as a single space for the purposes of matching. For example, with this option selected, "this text" would match "this text" but not "thistext". This option is not available when the Use Regular Expressions option is selected; you must explicitly write your regular expression to ignore whitespace. Tags do not count as whitespace. 
    • Search Text Only: Searches for specific text strings in the text of the document. A text search ignores any HTML that interrupts the string. For example, a search for "head" would match instances of head in the text only. The search ignores all instances of <head> and </head>.

    Note:

    The Search Text Only filter is disabled in the Advanced tab in the Find and Replace dialog.

    Filters in the Find and Replace dialog
    Filters in the Find and Replace dialog

  4. Do one of the following:

    • To find all instances of the specified text, select Find All. Dreamweaver opens the Search Results panel. If you are searching a single document, Find All displays all occurrences of the search text or tags, with some surrounding context. If you are searching a directory or site, Find All displays a list of documents that contain the tag.
    • To replace found text or tags, type in text in the Replace field, and click Replace or Replace All.
    • To walk through the found instances of the page, and replace them individually, click Replace, and use the next and previous arrows to navigate to other instances of the search term.
    • To replace all instances of the search term instantly, click Replace All. Dreamweaver replaces all the found instances, and provides a report of all the terms found and replaced in the Search Results panel.
    • To first see the Find results before replacing them, select Replace All and Exceptions. When this option is specified, the Find results are displayed in the Search Results panel. You can then deselect the instances you do not want to be replaced.

    Double-click a search result in the Search Results panel and Dreamweaver navigates to its location and places the cursor at the location of the text.

Find and replace tags, attributes, and text in code

You can search for specific tags, attributes, and attribute values. For example, you can search for all img tags that have no Alt attribute.

You can also search for specific text strings that are within or not within a set of container tags. For example, you can search for the word Untitled contained in a title tag to find all the untitled pages on your site.

Find and replace tags, attributes, and text in code within the currently open document

  1. Open the document to search in. Then select Find > Find in Current Document.

  2. To search for specific text within a tag, type the text string in the Find field, and select a tag from the drop-down field next to it.

    Search for text within a specified tag
    Search for text within a specified tag

    Dreamweaver highlights all instances of the specified text within the specified tags on the page being searched.

Find and replace tags, attributes, and text in code across several documents:

  1. Select Find > Find and Replace in Files or press Ctrl + Shift + F (on Windows), or Cmd + Shift + F (on Mac) to open the Find and Replace dialog box.

  2. In the Advanced tab, select one of the following Find in options:

    • Current Document - Dreamweaver searches for the specified phrase in the document that is currently open
    • Open Documents - Dreamweaver searches for the specified phrase in all open documents
    • Folder - Dreamweaver searches for the specified phrase in all the files located within the specified folder
    • Selected Files in Site - Dreamweaver searches for the specified phrase in files that are selected in the Files panel.
    • Entire Current Local Site - Dreamweaver searches for the specified phrase in the current site that you are working on.
    Advanced Find and Replace dialog
    Advanced Find and Replace dialog

  3. Type in the search parameters, and the required action.

  4. Do one of the following:

    • To find all instances of the specified text, select Find All. Dreamweaver opens the Search Results panel. If you are searching a single document, Find All displays all occurrences of the search text or tags, with some surrounding context. If you are searching a directory or site, Find All displays a list of documents that contain the tag.
    • To replace found text or tags, type in text in the Replace field, and click Replace or Replace All.
    • To walk through the found instances of the page, and replace them individually, click Replace, and use the next and previous arrows to navigate to other instances of the search term.
    • To replace all instances of the search term instantly, click Replace All. Dreamweaver replaces all the found instances, and provides a report of all the terms found and replaced in the Search Results panel.
    • To first see the Find results before replacing them, select Replace All and Exceptions. When this option is specified, the Find results are displayed in the Search Results panel. You can then deselect the instances you do not want to be replaced.

    Double-click a search result in the Search Results panel and Dreamweaver navigates to its location and places the cursor at the location of the text.

View search results

To view search results:

  1. Select Window > Results > Search to display the search results within the Search panel.

  2. Double-click a search result in the Search panel to view that instance within your document. 

  3. Right-click the icon at the top of the Search panel to open the pop-up menu that provides more options for checking in and checking out files (if you are using a version control system), do more find and replace operations, clear search results, or close the Search panel.

    Additional options within the Search results panel
    Additional options within the Search results panel

Save and load search queries

By default, saving and loading search queries is not enabled in Dreamweaver. However, if you really need to be able to save and load search queries, then complete the following steps to enable this feature.

  1. Make sure you have Dreamweaver CC 2017.1 installed. Open Dreamweaver and use the Advanced Find and Replace dialog at least once, and then close Dreamweaver.

  2. On Windows:

    1. Open the Registry Editor - In the Start Menu, either in the Run Box or the Search box, type regedit and press Enter.
    2. Navigate to the following location: HKEY_CURRENT_USER\SOFTWARE\Adobe\Dreamweaver CC 2017\Advanced Find And Replace
    3. Right click and create a new string value with ShowHiddenOptions=TRUE.
    4. Close the Registry Editor.

    Note:

    If you cannot find Advanced Find and Replace in your Windows Registry Editor, clear your Dreamweaver preferences, and open Dreamweaver again.

    On Mac:

    1. Use Finder to navigate to ~/Library/Preferences.
    2. Open Adobe Dreamweaver CC 2017 Prefs using a text editor.
    3. Find the [Advanced Find and Replace] section and add showhiddenoptions=TRUE.
    4. Save and close the file.
  3. Open Dreamweaver. Open the Advanced Find and Replace dialog. You can now see the options to load and save queries.

    The Save and Load queries options
    The Save and Load queries options

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy