Home > Back-end >  Application ultraedit text editor software use regular expressions to share
Application ultraedit text editor software use regular expressions to share

Time:11-07

Application Ultraedit provides a very rich editing function, which is very important to find and replace function must all been used, application Ultraedit regular expressions to find replacement is very convenient and powerful, can be in separate files, and specifies the directory to find replacement,

Many friends have used or are using application UltraEdit, accompany me for several years, the editors from influences me a lot of places shortcuts habit of writing code, application UltraEdit provides a very rich editing function, which is very important to find and replace function must have all been used, application UltraEdit regular expressions to find replacement is very convenient and powerful, can be in separate files, and specifies the directory to find replacement,

Regular expression syntax:

First - % matching line to search string must be at the beginning.
$matches the end of each line - indicates that to search string must be good at tail
? Matches any single character except newline.
* matches any number of characters appear any number of times (not including line breaks)
+ match leading character or expression appears one or more (not including line breaks)
+ + match leading character or expressions don't appear or appear more than once (not including line breaks)
^ b matches page interrupt descriptor
^ p files matching DOS line breaks
^ r files matching MAC newline (CR Only)
^ n match UNIX file a newline (LF Only)
^ t match a TAB
Single character in square brackets [] matching

Commonly used regular expressions:
Remove empty lines: replace %] [^ t + + ^ p is empty string
Delete the end of each line Spaces: replace [^ t] + $null string
Delete rows first Spaces: replace % [^ t] + null string
Each row is set to begin fixed four Spaces: replace %] [^ t + + ^ (^) [~ ^ ^ t p] for "^ 1"
Each set to begin fixed four Spaces: replace % [^ t] + "
"(if a line begins with a space, is regarded as the beginning of the period of line)
A merge into one line: replace [^ t] + + p ^ ^ (^) [~ ^ ^ t p] is ^ 1
(note: this assumes that the text is based on DOS way carriage returns - CR/LF)
Remove the HTML TAG: replace ^ {& lt;> ^ ^} {& lt; ^ p> ^} is empty string
Delete all of the HTML: replace & lt; [] + + a + + + +=href [] [] * & gt; Empty string
Delete the specified in the text of the first two characters: replace %?? Empty string
In the fourth column after insert 2 white space characters: replace % ^ (???? (^ ^)? ^) as the "^ 1 ^ 2
"Find all the Numbers: [0-9] + [.] [0-9] + + +
Find all the words: [a-z] +
Find all the url: "http://[a - z0-9 ^ ~ ` _./^ - ^?=& amp;] + "

Application UltraEdit download latest version v27 software programmers will use advanced text editor:

http://wm.makeding.com/iclk/? Zoneid=38308

CodePudding user response:

Only can this charge, really works

CodePudding user response:

Is not expensive, you can edit text, hexadecimal, ASCII, can completely replace notepad (if strong enough) computer configuration, built-in English words, c + + and VB instructions highlighting, can edit multiple files at the same time, and even open a file will not be slow,
  • Related