Посібник користувача Скасувати

Find and replace text, tags, and attributes

  1. Dreamweaver User Guide
  2. Introduction
    1. Responsive web design basics
    2. What's new in Dreamweaver
    3. Web development using Dreamweaver - An Overview
    4. Dreamweaver / Common Questions
    5. Keyboard shortcuts
    6. Dreamweaver system requirements
    7. Feature summary
  3. Dreamweaver and Creative Cloud
    1. Synchronize Dreamweaver settings with Creative Cloud
    2. Creative Cloud Libraries in Dreamweaver
    3. Using Photoshop files in Dreamweaver
    4. Work with Adobe Animate and Dreamweaver
    5. Extract web-optimized SVG files from Libraries
  4. Dreamweaver workspaces and views
    1. The Dreamweaver workspace
    2. Optimize Dreamweaver workspace for visual development
    3. Search files based on filename or content | Mac OS
  5. Set up sites
    1. About Dreamweaver sites
    2. Set up a local version of your site
    3. Connect to a publishing server
    4. Set up a testing server
    5. Import and export Dreamweaver site settings
    6. Bring existing websites from a remote server to your local site root
    7. Accessibility features in Dreamweaver
    8. Advanced settings
    9. Set site preferences for transferring files
    10. Specify proxy server settings in Dreamweaver
    11. Synchronize Dreamweaver settings with Creative Cloud
    12. Using Git in Dreamweaver
  6. Manage files
    1. Create and open files
    2. Manage files and folders
    3. Getting and putting files to and from your server
    4. Check in and check out files
    5. Synchronize files
    6. Compare files for differences
    7. Cloak files and folders in your Dreamweaver site
    8. Enable Design Notes for Dreamweaver sites
    9. Preventing potential Gatekeeper exploit
  7. Layout and design
    1. Use visual aids for layout
    2. About using CSS to lay out your page
    3. Design responsive websites using Bootstrap
    4. Creating and using media queries in Dreamweaver
    5. Present content with tables
    6. Colors
    7. Responsive design using fluid grid layouts
    8. Extract in Dreamweaver
  8. CSS
    1. Understand Cascading Style Sheets
    2. Laying out pages using CSS Designer
    3. Using CSS preprocessors in Dreamweaver
    4. How to set CSS Style preferences in Dreamweaver
    5. Move CSS rules in Dreamweaver
    6. Convert inline CSS to a CSS rule in Dreamweaver
    7. Work with div tags
    8. Apply gradients to background
    9. Create and edit CSS3 transition effects in Dreamweaver
    10. Format code
  9. Page content and assets
    1. Set page properties
    2. Set CSS heading properties and CSS link properties
    3. Work with text
    4. Find and replace text, tags, and attributes
    5. DOM panel
    6. Edit in Live View
    7. Encoding documents in Dreamweaver
    8. Select and view elements in the Document window
    9. Set text properties in the Property inspector
    10. Spell check a web page
    11. Using horizontal rules in Dreamweaver
    12. Add and modify font combinations in Dreamweaver
    13. Work with assets
    14. Insert and update dates in Dreamweaver
    15. Create and manage favorite assets in Dreamweaver
    16. Insert and edit images in Dreamweaver
    17. Add media objects
    18. Adding videos in Dreamweaver
    19. Insert HTML5 video
    20. Insert SWF files
    21. Add audio effects
    22. Insert HTML5 audio in Dreamweaver
    23. Work with library items
    24. Using Arabic and Hebrew text in Dreamweaver
  10. Linking and navigation
    1. About linking and navigation
    2. Linking
    3. Image maps
    4. Troubleshoot links
  11. jQuery widgets and effects
    1. Use jQuery UI and mobile widgets in Dreamweaver
    2. Use jQuery effects in Dreamweaver
  12. Coding websites
    1. About coding in Dreamweaver
    2. Coding environment in Dreamweaver
    3. Set coding preferences
    4. Customize code coloring
    5. Write and edit code
    6. Code hinting and code completion
    7. Collapse and expand code
    8. Reuse code with snippets
    9. Lint code
    10. Optimize code
    11. Edit code in Design view
    12. Work with head content for pages
    13. Insert server-side includes in Dreamweaver
    14. Using tag libraries in Dreamweaver
    15. Importing custom tags into Dreamweaver
    16. Use JavaScript behaviors (general instructions)
    17. Apply built-in JavaScript behaviors
    18. About XML and XSLT
    19. Perform server-side XSL transformations in Dreamweaver
    20. Performing client-side XSL transformations in Dreamweaver
    21. Add character entities for XSLT in Dreamweaver
    22. Format code
  13. Cross-product workflows
    1. Installing and using extensions to Dreamweaver
    2. In-App updates in Dreamweaver
    3. Insert Microsoft Office documents in Dreamweaver (Windows only)
    4. Working with Fireworks and Dreamweaver
    5. Edit content in Dreamweaver sites using Contribute
    6. Dreamweaver-Business Catalyst integration
    7. Create personalized email campaigns
  14. Templates
    1. About Dreamweaver templates
    2. Recognizing templates and template-based documents
    3. Create a Dreamweaver template
    4. Create editable regions in templates
    5. Create repeating regions and tables in Dreamweaver
    6. Use optional regions in templates
    7. Define editable tag attributes in Dreamweaver
    8. How to create nested templates in Dreamweaver
    9. Edit, update, and delete templates
    10. Export and import xml content in Dreamweaver
    11. Apply or remove a template from an existing document
    12. Edit content in Dreamweaver templates
    13. Syntax rules for template tags in Dreamweaver
    14. Set highlighting preferences for template regions
    15. Benefits of using templates in Dreamweaver
  15. Mobile and multiscreen
    1. Create media queries
    2. Changing page orientation for mobile devices
    3. Create web apps for mobile devices using Dreamweaver
  16. Dynamic sites, pages and web forms
    1. Understand web applications
    2. Set up your computer for application development
    3. Troubleshoot database connections
    4. Removing connection scripts in Dreamweaver
    5. Design dynamic pages
    6. Dynamic content sources overview
    7. Define sources of dynamic content
    8. Add dynamic content to pages
    9. Changing dynamic content in Dreamweaver
    10. Display database records
    11. Provide and troubleshoot live data in Dreamweaver
    12. Add custom server behaviors in Dreamweaver
    13. Building forms using Dreamweaver
    14. Use forms to collect information from users
    15. Create and enable ColdFusion forms in Dreamweaver
    16. Create web forms
    17. Enhanced HTML5 support for form elements
    18. Develop a form using Dreamweaver
  17. Building applications visually
    1. Build master and detail pages in Dreamweaver
    2. Build search and results pages
    3. Build a record insert page
    4. Build an update record page in Dreamweaver
    5. Building record delete pages in Dreamweaver
    6. Use ASP commands to modify database in Dreamweaver
    7. Build a registration page
    8. Build a login page
    9. Build a page that only authorized users can access
    10. Securing folders in Coldfusion using Dreamweaver
    11. Using ColdFusion components in Dreamweaver
  18. Test, preview, and publish websites
    1. Preview pages
    2. Preview Dreamweaver web pages on multiple devices
    3. Test your Dreamweaver site

 

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.

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

    Примітка.

    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.

    Примітка.

    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>.
    Примітка.

    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

Select Find > Find and Replace.

To save queries, click the Save icon as shown in the Find and Replace dialog and choose the destination to save the file as .dwr file. 

To load queries, click the Load icon and choose the .dwr query file from your computer. 

Save and load search queries

For Dreamweaver 2017 and 2018 versions

By default, saving and loading search queries is not enabled in Dreamweaver 2017 and 2018 versions. 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 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.
    Примітка.

    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. Right-click and create a string value with ShowHiddenOptions

  4. Add the value data as TRUE

  5. Close the Registry Editor. 

Логотип Adobe

Увійдіть до облікового запису