notepad ++ regex

Start% matching lines - displays the search string must start the line, but does not include any line terminator characters in the resulting string in the selected.
End of line matching $ - end of the line must display the search string, but does not include any line terminator character string in the selected result.
? In addition to matches any single character except newline
* except newline match any number of characters and numbers
+ before a match one or more characters, but at least appear to be a
++ previous character matches zero or more, but at least to appear a
^ b matches a tab
^ p matches a line feed (CR / LF) (segment) (the DOS file)
^ R & lt matches a newline (CR only) (segment) (the MAC file)
^ n-match a newline ( LF only) (segment) (the UNIX file)
^ T matches a character label the tAB
[] matches any single character, or a range in square brackets
^ {a ^} ^ {B ^} a match expression or B
^ weight carrier subsequent regular expression character
^ (^) includes a label or for expression of the replace command.

A regular expression can have up to nine label expression, according to the regular expression needs.
Alternatively the corresponding expression is ^ x, x is 1-9 replacement range. For example:
the If ^ (H * O ^) ^ (F * S ^) The matches "Hello Folks",
. ^ 2 ^. 1 Would Replace IT with "Folks Hello"

(. Hello Folks will be replaced folks hello)

Note: ^ The actual character is not Ctl + ^ keys.

E.g:
m? n matching "man", "men", "min" but not "Moon."
T * T matches "test", "tonight" and "tea time" (the "tea t" portion) but does not match " TEA
Time "(NEWLINE BETWEEN" TEA "and" Time ").
Te + ST matching" test "," teest ", " teeeest " and the like. But does not match "tst".
[aeiou] lowercase match each vowel.
[.?] Matches a word "and", ".", Or "?".
[0-9, az] matches any digit, or lowercase letters.
[~ 0-9] matches any character except digital (~ means "no")

you can find as follows an expression A or B:

"John ^ ^ {} ^ {^} Tom,"

which will be looking for John or the emergence of Tom's. It should be nothing between the two expressions.

You can combine A or B and C or D as follows in the same search:

"^ {John ^} ^ {Tom ^} ^ {Smith ^} ^ {Jones ^}"

This will be found Smith or behind John or Tom jones.

The following table "








* Matches the preceding character zero or more times. EXAMPLE
+ character matches one or more of the foregoing. Example
. In addition to matching a newline character matches any single character.
(expression) mark for the replacement of the command expression. A regular expression as needed, can have up to nine label expression. The corresponding expression is replaced by x, x ranges from 1-9.

For example:

the If (. H * O) (. F * S) The matches "Hello Folks",
. 2. 1 Would Replace IT with "Folks Hello"
(Hello Folks will be replaced Folks Hello.)

[XYZ] a character set. Matches any character between brackets.
[^ xyz] A negative character set. It does not match any of the characters between the brackets.
d matches a numeric character. Equivalent to [0-9].
D Matches a non-numeric characters. It is equivalent to [^ 0-9].
f matches a form feed character.
n matches a newline character.
r match a carriage return character.
s match any blank spaces, tabs, form feed, including spaces and so on, but does not match a newline.
S matches any non-whitespace characters, but does not match a newline.
t match a label TAB character.
v matches a vertical tab character.
w matches any word character including underscore.
W Matches any non-word character character.

Note: The actual character ^ ^ is not Ctl + key.

E.g:
mn matching "man", "men", "min" but does not match "Moon."
T + T match "test", "tonight" and "tea time" (the "tea t" portion) but does not match "TEA
Time "(NEWLINE BETWEEN" TEA "and" Time ").
Te * ST matching" test "," teest ", " teeeest " and the like. But does not match "tst".
[aeiou] lowercase match each vowel.
[.?] Matches a word "and", ".", Or "?".
[0-9, az] matches any digit, or lowercase letters.
[^ 0-9] matches any character except digital (~ means "no")

you can find as follows an expression A or B:

"(John) | (Tom)"

which will be looking for John or Tom's appear. It should be nothing between the two expressions.

You can combine A or B and C or D as follows in the same search:

"(John | Tom) (Smith | Jones)"

This will find Smith or Jones in the back of John or Tom.

Further:

P matches the CR / LF (same as rn) as DOS match line terminator

if the Find / Replace function of regular expression is not selected, then the alternative following characters in the field are valid:

Symbol Function

^^ match a "^" character
^ s replaced is selected (highlighted) active document window article.
C ^ replace the contents of the clipboard
^ b matches a page crack
^ p matches a line feed (CR / LF) (segment) (the DOS file)
^ R & lt matches a newline (CR only) (segment) (the MAC file)
^ n matches a line feed (LF only) (segment) (the UNIX file)
^ T tag matches a tAB character

 

After deleting all characters S: s * $.

S before deleting all characters: ^ * s.

Guess you like

Origin www.cnblogs.com/xx0829/p/11274094.html