About finding and replacing text and code

Microsoft Office FrontPage 2003

About finding and replacing text and code

You can quickly find and replace text or code in a single page or all pages of a Web site. You can do so by using a variety of search criteria. For example, you can specify which pages and what direction you want to search, as well as how you want to search for text or code in those pages. If you frequently perform the same search, you can save it as a query. The next time you want to perform that search, you can open the query, instead of entering the search criteria again.

In addition to searching for instances of specific text or code, you can search for a pattern of text or code by using regular expressions or HTML rules.

Regular Expressions

A regular expression is a pattern of text that describes one or more variations of text or code that you want to find. A regular expression consists of specific characters— for example, the letters "a" through "z"— and special characters that describe the pattern of text— for example, an asterisk (*). For example, to find all variations of "page" in your Web site, you can search for "page*." If you do so, Microsoft FrontPage finds all instances of "page," "pages," "pager," and any other words that begin with "page" in your Web site.

HTML Rules

You can use HTML rules in your searches and have advanced HTML tag and attribute find and replace options. By using HTML rules in your search, you can determine where and under what conditions to search your code. For example, you can create an HTML rule to search text only inside a tag. Text outside of the tag would be excluded from search results.

Microsoft FrontPage provides the following HTML rules:

With Attribute   Finds the text or tag only if it is in a tag with an attribute. For example, you can search for all instances of "Arial" and limit your search to only those tags that include a specific attribute

Without Attribute   Finds the text or tag only if it is in a tag without an attribute. For example, you can search for all instances of "p" and limit your search to only those tags that do not include a specific attribute.

Containing   Finds the text or tag only if it is in another tag or text that you specify. For example, you can search for all instances of the font <font> tag that are nested in a bold <b> tag.

Not Containing   Finds the text or tag only if it is not in another tag or text that you specify. For example, you can search for all instances of the table <table> tag that are not nested in another tag.

Inside Tag   Finds the text or tag only if it is in a tag that you specify. For example, you can search for all instances of the word "font" and all instances of the font <font> tag will be in your search results.

Not Inside Tag   Finds the text or tag only if it is not in a tag that you specify. For example, you can search for all instances of the word "font" and instances of the font <font> tag will not be in your search results.