Hide, Show, and Delete Found Lines in UltraEdit/UEStudio
Over time, many of our users have asked for the ability to hide/show lines based on a Find string... you got it! As of v16.00, you can now hide/show and even delete text based on your search criteria. The following power tip will guide you through the hide/show lines feature.
For the purposes of this power tip, we will use a log file to hide/show lines; however, this feature can be used on any type of file. For our example, we will be searching an apache error log for the words "warning" or "error" - our search string is a perl regular expression "(warning|error)". Initially, we would like to view ONLY the lines that contain these two words.
First, open the Find dialog (CTRL+F will open the Find dialog) and type your find string.
In our example, since we want to only view the lines that contain "warning" and "error", we will click on the Show Lines button in the Find dialog.
Note: If you do not see the Hide/Show Lines buttons, click on the Advanced button to expand the advanced options.
As you can see, our log file has been filtered to display ONLY the Warning/Error lines.
As a different example, consider that you would like to hide all lines that match your search string - for our example file, we will use "notice".
Open the Find dialog (CTRL+F will open the Find dialog) and type your find string.
Now, since we want to hide the lines that contain "notice", we will click on the Hide Lines button in the Find dialog.
As you can see, our log file has been filtered to display ONLY the lines that do not contain "notice".
The final feature that we will demonstrate in this power tip is the Delete Hidden Lines feature. As you would expect, the delete hidden lines feature simply deletes the lines that are hidden (folded).
After hiding/showing lines, as described above, you can delete the lines by clicking on Delete Hidden Lines in the Edit : Delete submenu.
As you can see, after executing the delete hidden lines, we are left with a "filtered" result file. The result file only includes lines that do not contain the word "notice" - as described in our "Hide Found Lines" example.