Finding project text in code and content to replace or report on
If you are an administrator or have permissions, you can create a report identifying the number of times the search text appears anywhere in each project component you select. This search can match text, an attribute or element name, an attribute or element value, processing instruction, or comment. Creating a report allows you to know where the keywords exist without opening or changing each component. You can also update the content using the Replace option.
This option searches for a term anywhere inside a component. This includes all code and text.
You can also search in XML values, XML code, comments, or every part of a topic. In each of these cases the steps vary slightly.
- Finding project text to replace or report on
- Finding project attributes to replace or report on
- Finding processing instructions in projects
For a description of these searches, read Set the scope for find and replace.
Before you begin
Permissions can't be blocked. A content owner or administrator can set permissions to deny access to components or folders. If your permissions to content has been blocked and you are not an administrator, you cannot use the Find and Replace option in the Selected Components pane.
Use supported components
- If you choose a component that's locked (
by you,
by another user,
by the system) Inspire skips it and adds a warning to your notification.
- If you choose a binary component, Inspire skips it and adds a warning to your notification.
Searches are not case sensitive by default
- You can select the Case Sensitive option.
- This option limits your results to the word or phrase exactly as it appears in both your criteria and the component.
Now, when you use Find and replace with the scope of All, there are two new options:
- Regular Expressions: Lets you build regular expressions for wild card search and replace on characters.
- For example, search for
\/>(\s+)<b([^>]+)>WARNING<\/>
to find a match using regular expressions. - You can lookup RegEx examples to build expressions at: https://regex101.com/
- For example, search for
- Ignore Whitespace: Ignores whitespaces between tags when searching.
- For example, when searching for
/> <b
in a document with Ignore Whitespace checked, the white space is ignored and the match is found.
- For example, when searching for
Using parenthesis
- Inspire recognizes a parenthesis character ( ) as something that indicates a grouping of search items.
- If you want to search for a text value that actually contains a parenthesis character ( ), you must tell Inspire to interpret it literally.
- To do that, use a slash \ before any parenthesis character ( ).
- For example, if you want to search for the following value: Chapter1_Intro(with_endnotes), in the search box you would enter Chapter1_Intro\(with_endnotes\).
Searching for text and creating a report does not update or change any of the components you're searching in.