Home » Support » Tutorials/Power Tips » UltraEdit » Hide, Show, and Delete Found Lines in UltraEdit/UEStudio

IDM PowerTips

Hide, show, and delete found lines in UltraEdit / UEStudio

In this power tip, we'll take a look at how to filter lines containing a specific string in UltraEdit and UEStudio using the Find dialog. This power tip is divided into 3 parts:

  1. Show only lines containing search string
  2. Hide all lines containing search string
  3. Delete all lines containing search string

Show only lines containing search string

For this example, we will search UltraEdit's "changes.txt" file for the words "hide" or "show" – our search string is a Perl regular expression that searches for either string at once: hide|show. (Learn more about the power of Perl regex.) Initially, we would like to view ONLY the lines that contain either of those two words.

First, open the Find dialog (hold Ctrl and press F twice to bypass Quick Find and open the large Find dialog) and type your find string.

Screenshot for Hide and Show Found Lines power tip

Before clicking "Next", let's check the "Filter lines" option and select "Show":

Screenshot for Hide and Show Found Lines power tip

Note: If you do not see the Hide/Show radio buttons, click on the gear icon to expand the advanced options.

Click "Next", and as you can see, our file has been filtered to display ONLY lines containing the text "show" or "hide":

Screenshot for Hide and Show Found Lines power tip

You can unhide these hidden lines at any time by pressing Ctrl + × (Multiply on the Numeric Keypad) or by going to ViewHide/Show LinesExpand All.


Hide all lines containing search string

Obviously, if we want to hide all lines containing our search string, we'd simply select the "Hide" option under "Filter lines" instead. Let's say we want to hide all sub-items in the changes list – i.e., any line that begins with four spaces and an asterisk. Using the Perl regex character "^" to represent the start of a line, the following regexp should do it: ^ {4}\*.

Screenshot for Hide and Show Found Lines power tip

Click "Next", and again our file is filtered to hide all lines starting with four spaces and then an asterisk:

Screenshot for Hide and Show Found Lines power tip


Delete all lines containing search string

After hiding/showing lines, as described above, you can delete hidden lines by going to EditDeleteDelete All Hidden Lines.

Screenshot for Hide and Show Found Lines power tip

In this example, our result is a file that no longer includes lines starting with four spaces and then an asterisk:

Screenshot for Hide and Show Found Lines power tip