The text search script gives you an alternatvie interface to performing a text search from within IDEA. The script allows you to select up to 10 different search terms (you can use the wildcards), it also allows you decide if the search is case sensitve or not and the type of search, i.e. is it an AND or OR type search. One thing the script does is it allows you to create a text file that contains your search terms and import the text file. So instead of reentering the data each time you can use notepad to create the text file with the terms you are looking for. For the text file to work it must follow the IDEA syntax that is listed in the Search help.
The text search has been updated (August 17, 2017), the code behind the dialogs has been rewritten and the import text files now use the open dialog.
The Idea “Text Search” script simplifies searching for text in character fields. An “Advanced Search” option allows for predefined search terms to be executed from the selected text file.
A maximum of 10 search terms may be entered. A text file may also be selected. The search term entry boxes may be used in conjunction with the “Advanced Search” option.
The first step to conduct a text search is to select the file to be tested. Files from within the current IDEA working folder are presented as options. The second step is to select the fields that you wish to search within. The double right arrow button “>>” will select all the fields.
Enter up to 10 search terms in the search boxes in the sequence in which you wish to find the text. You may use the asterisk (*) and question mark (?) wild card characters in the search term boxes. The IDEAScript is hardcoded with the quotes for explicit multi word searches, for example, to search for “New York City”, only the words need to be entered and not the quotes as they are hardcoded.
The “Search Type” defaults to OR so that any matches to any of the search terms will be displayed. By selecting AND, matches to all of the search terms must be meet before any results are displayed.
By selecting the “Advanced Search” button, a text file of predefined search terms may be executed. The IDEAScript asks if the text file is located in the current IDEA working directory. If Yes is selected, then all text files in the working directory are offered for selection. If No is selected, then you must browse the selected drive for the folder where the text file resides.
Predefined terms in text files must follow the rules outlined by IDEA. The “Enter” key or “Carriage Return” character must not be used. Additional information including tips, features and syntax rules are detailed in the IDEA Search help area, as depicted below.
The search term area may be used in isolation or in combination with a text file accessed via the “Advanced Search” button. The advanced search feature can also be used in isolation.
Numerous predefined text files may be prepared and saved. For example, one file may be a required step in an audit plan while another file may contain search terms that are unique to a geographic area or industry. A library of search terms may be developed to be shared amongst staff.
After you click OK to run the IDEAScript, a new data file with the results is created using the default prefix of “TS”. This prefix may be changed prior to running the script. If a file already exists with the same name, the prefix is updated and a new file name is given.