Regexware.com

Setting up EmEditor

 
                     

Setting up EmEditor - Page 5. Using regular expressions in EmEditor Find dialog

Remember to check Regular Expressions in the find dialog when using these.

Find ASP code: <%(.)*%> works within a single line in emeditor but unfortunately fails over multiple lines (like in many grep tools - unless you put in the exact amount of \n sequences)
e.g.
<%If xxx whatever %>

Select an entire line in EmEditor with ^.*

^.*\): to strip the lines out of a "Find in Files" EmEditor file.
e.g. it finds this part of the line (which is the "Tag Jump"):
D:\_To Backup\Log analysis\ex021112.log(20264):

The above is useful if you want to use the results page for further processing. (Normally this part of the line forms a Tag Jump hyperlink for EmEditor to open the file at the line number.)

To find repeated words:
(\w+)\W* (?=\1(\W+|\s+|$))

To find repeated lines
(^.*$)\n\1
This variation excludes blank lines:
(^.+$)\n\1

Remove date from
12 April 2003 21:22:19
Find:
(^[0-9]+ [a-zA-Z]+ [0-9]+) [0-9][0-9]:[0-9][0-9]:[0-9][0-9]
Replace:
\1

To find same IP address after switch1 but different stuff following it:
e.g.
12 May 2003 switch1 1.2.3.4 xxx
12 May 2003 switch1 1.2.3.4 yyy
(^[0-9]+ [a-zA-Z]+ [0-9]+\tswitch1\t)([.0-9]+\t)(.*)\n\1\2

<<Back to the start

Page 2. Setup previous Search String colors
Page 3. Setting up plug-ins
Page 4. Setting up shortcuts in External Tools menu
Page 5. Using regular expressions in EmEditor Find dialog


If you don't already have EmEditor, download it now!


Please check out my links page




REGEXWARE HOME