Using wildcards in a search
When you select Regular Expression in the Find window, you activate wildcard searching. GoLive makes wildcard searching easier by allowing you to use editable wildcard patterns from the search history pop-up menu in the Find window. Wildcard patterns appear below the separator line in the search history menu.
To use wildcards in a search: - In the Find window, choose a wildcard pattern from the search history pop-up menu at the top of the window or type a search string in the Find text box. (See the wildcard search options in the following table.)
- Select Regular Expression.
- Click Find.
To edit the wildcard patterns in the search history menu: - Choose Edit > Preferences, expand Find, and select Regular Expressions in the left pane of the Preferences dialog box.
- In the right pane, do any of the following:
- Click the New button
to add a wildcard pattern to the list. - Select a wildcard pattern in the list and enter a new name, regular expression, and replacement value in the text boxes below the list.
- Select a wildcard pattern and click the Delete button
to remove it from the list. - Click the Reset to Defaults button
to return the list to the original wildcard patterns.
- Click OK.
The edited list of wildcard patterns appears in the search history menu in the Find window. Use these guidelines when wildcard searching: - Characters that are used to specify wildcard options, such as "?", "\", "[", and "]", must be preceded by a backslash. For example, "\?" finds any question mark.
- The caret serves as a wildcard character only when it precedes a range of characters, as in "[^A-Z]".
- The dash does not act as a wildcard character if it precedes a range of characters, as in "[-ABC]" or "[^-ABC]". At any other location, it acts as a wildcard character indicating a "from...to" relationship.
The following table lists available wildcard search options: Wildcard Option | Action |
---|
Wildcards for Single Characters | . | Finds any single character. | [] | Finds any one of the characters in square brackets. For example: "[0123456789]" finds any digit. "[a-zA-Z]" finds any alphabetical character. | Finds any one character in a range enclosed in square brackets. For example: "[0-9]" finds any digit. | [^] | Finds any character other than the characters following the caret symbol (^) in the brackets. For example: "[^ab]" finds any character, except for "a" and "b" | \d (or [0-9]) | Finds any digit. | \D (or [^0-9]) | Finds any character other than a digit. | \w (or [a-zA-Z]) | Finds any character. | [a-zA-Z]+ | Finds any word. | \W (or [^a-zA-Z]) | Finds any character other than alphabetical characters. | \s (or [SPACE+\t]) | Finds any white space (SPACE = space key). | \S | Finds any character other than a white space. | \r | Finds any line break (in HTML source code). | \t | Finds any tab character, such as indentations in HTML source code. | \x00 - \xff | Finds any character, as identified by its ASCII value. For example: "\X43" finds "C" | Quantifiers | ? | The question mark makes the preceding character or string (enclosed in parentheses) optional. For example: "(Adobe )?GoLive" finds "Adobe GoLive" and "GoLive". | + | The plus sign finds one or more occurrences of the preceding character or search string in a row. For example: "ba+" finds "ba", "baa", "baaa", etc. | * | The star is equivalent to a "?" and a "+", and can result in a "not found" message if no occurrences are found. The character preceding the "*" is optional. For example: "ba*" finds "b", "ba", "baa", etc. | Other Search String Modifiers | | | The vertical bar serves as a separator for alternative search strings. For example: "Adobe|GoLive|4.0" finds "Adobe", "GoLive", and "4.0". | () | Parentheses enclose a search string that serves as a definition for quantifiers. For more information, see the description of "?" above. | ^ | In source mode, the caret finds the start of a line. In the Layout Editor, it finds the beginning of a paragraph. | $ | In source mode, the dollar sign finds the end of a line. In the Layout Editor, it finds the end of a paragraph. |
Search String | Finds |
---|
Adobe|GoLive | "Adobe" or "GoLive" | m(i|a)ll | "mill" or "mall" | Adobe(GoLive)? | "GoLive" if the latter exists, else "Adobe" | </?HTML> | "<HTML>" and "</HTML>" | Ye+s | The word "Yes", containing any number of successive "e" characters, such as "Yes", "Yees", "Yeees", etc. | Michael J[a-z]* | Any string beginning with "Michael J", followed by any number of lowercase letters, such as "Michael Jones", "Michael Jamrosy", and "Michael Jordan" | <H[1-6]> | HTML headings H1 through H6, including "H1", "H2", "H3", etc. | <[a-zA-Z][a-zA-Z0-9]*> | Any start tag that has no attributes, such as "<P>", "<b>", "<H2>", "<ImaGe>" | <[a-zA-Z][a-zA-Z0-9]*[^>]*> | Any start tag, including those with attributes, such as "<image width=20>" |
|