????? (Regular Expressions)
???? (???
[2012] ?EmEditor???)
????? (MS
Office FrontPage 2003 ????)
Regular Expressions (UltraEdit 16 Help)
???????
(EditPlus 2.12 ??????)
_\u[N|T|R|L|C|P|V|A|D|S|B|P|O|M|E|G|J|$]*
?????????
^[ ?\t]*\n
????????????????????????????????????????????????
(^|(?<=??)).*?(?=??|$)
?????????????????????????????????????????
^[ ?\t]+
??????????????????????????????????
[ ?\t]+$
??????????????????????????????????
^[ ?\t]+|[ ?\t]+$
??????????????????????????????????????????9FA5
[\u4E00-\u9FA5]?[?-?]
??????????????????????????????????
[^\x00-\xff]
??????????????????????????????????????????2?ASCII???1?
\n\s*\r
????????????????????????????\n[\s\t]*$????
<
(\S*?)[^>]*>.*?|< .*? />
??HTML???????????????????????????????????????????????????
^\s*|\s*$
?????????????????????????????????(??????????????)?????????
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
??Email?????????????????????
[a-zA-z]+://[^\s]*
????url????????????????????????????????????
^[a-zA-Z][a-zA-Z0-9_]{4,15}$
????????????????5-16??????????????????????????
\d{3}-\d{8}|\d{4}-\d{7}
????????????????? 0511-4405222 ? 021-87888822
[1-9][0-9]{4,}
????QQ???????QQ??10000??
[1-9]\d{5}(?!\d)
???????????????????6???
\d{15}|\d{18}
????????????????15??18?
\d+\.\d+\.\d+\.\d+
??IP????????IP??????
???????
^[1-9]\d*$ ?????
^-[1-9]\d*$ ?????
^-?[1-9]\d*$ ????
^[1-9]\d*|0$ ?????????? + 0?
^-[1-9]\d*|0$ ?????????? + 0?
^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$ ??????
^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$ ??????
^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$ ?????
^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$ ???????????? + 0?
^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$ ???????????? + 0?
??????????????????????
???????
^[A-Za-z]+$ ???26???????????
^[A-Z]+$ ???26??????????????
^[a-z]+$ ???26??????????????
^[A-Za-z0-9]+$ ??????26???????????
^\w+$ ??????26???????????????
^.*John.*$ ????John????
????????????? Microsoft FrontPage ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????? FrontPage ?????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????????????????????????
????? FrontPage ?????????????
??? |
|
???? |
???? |
. |
????????????? (\n) ???????????????? ???????? |
??????? |
* |
?????????????????????????????? ????? ???????? |
??????? |
+ |
?????????????????????????????? ????? ???????? |
??????? |
@ |
?????????????????????????????? ????? ???????? |
??????? |
# |
?????????????????????????????? ???????? |
??? |
[ ] |
???? ([ ]) ???????????????? (-) ?????????? ??? ·
????? ·
????? [0-9] ??????????? ·
?????????????????
|
?? |
^ |
????????? ???????? |
?? |
$ |
????????? ???????? |
???? |
^^ |
?????????????????????????????? ??????????????? HTML ?????????????? |
???? |
$$ |
?????????????????????????????? ???????????????? HTML ??????????????????????? |
?? |
| |
?????????????? OR ?? (|) ?????????? ???????? ·
it belongs to him
·
it belongs to her ??????it belongs to them? |
?????? |
\ |
????? ( \ ) ????????????????????????????????? ({) ???? (^)??????????? ?????? |
?????? |
{} |
???????????????????????????????????????? \N ????????????? ????????????????????????????????? ??????????????????????????????????????? ???????????? ({}) ???? (#) ??? (.) ??????????????? |
? N ?????? |
\N |
????????\N ???? N ?????????????? N ?
1 ? 9 ???? ????????\N ???? N ?????????????? N ? 1 ? 9 ????\0 ??????????????? ???????????????????????????????????????????? ??????????????????????????????????????????????????? ({}) ???? (#) ??? (.) ???????? ?????????????? \1 ????????????????????????????????? \1??????????????????????? |
???? |
( ) |
????????????? ?????????? ( ) ???????????????? ???????????'haha' ? 'hahaha'? |
???? |
~x |
? x ????????????????? ???????? |
??? |
\n |
?????????????????? <br>? ?? (\n) ?????????????? |
??? |
\t |
???????? ??????????????????????????????
???????????? (\t) ???? (^) ??? (+) ??????????? (^) ???????????????????????????????? (+) ??????????????? |
????????????? |
[^] |
???????????? (^) ?????????? ??????????????????????? (^) ??????????????????? |
????? |
^n |
????? (^) ??????? n ???? ???? n ?
4???? |
?????? |
:a |
????? ??????? |
?? |
:b |
???????????? ???????????????????????????? |
???? |
:c |
????? ????????? |
???? |
:d |
????? ?????????????????????????????????? 999-99-9999? ???????? |
????? |
:h |
????? ?????????? 'A' ? 'F' ??????????????????????? ????????????????????????????????????????? 000000??????????????????????????????????????????
???? [0-9a-fA-F] ?????????????? (\) ????????? (:h) ????????\# ????????? (#)?? :h ????????????? ?????????????????????????????? |
??? |
:i |
????? ????????????????????????????? |
??? |
:n |
????? ????????????????????????? |
?????? |
:q |
????? ?????????????????????? |
????? |
:w |
????? ????????????????????????????? |
????? |
:z |
????? ??????????????????? |
UltraEdit allows for Regular Expressions in many of its search and
replace functions listed under the Search Menu.
Regular expressions allow more complex search and replace
functions to be performed in a single operation.
There are two possible sets of legacy syntax that may be used. The
first table below shows the original UltraEdit syntax used in earlier versions
of UltraEdit. The second table shows the optional "Unix" style
regular expressions. This may be enabled from the Configuration Section.
Regular Expressions (UltraEdit Syntax):
Symbol |
Function |
% |
Matches the start of line - Indicates the search string must be
at the beginning of a line but does not include any line terminator characters
in the resulting string selected. |
$ |
Matches the end of line - Indicates the search string must be at
the end of line but does not include any line terminator characters in the
resulting string selected. |
? |
Matches any single character except newline. |
* |
Matches any number of occurrences of any character except
newline. |
+ |
Matches one or more of the preceding character/expression. At
least one occurrence of the character must be found. Does not match repeated
newlines. |
++ |
Matches the preceding character/expression zero or more times.
Does not match repeated newlines. |
^b |
Matches a page break. |
^p |
Matches a newline (CR/LF) (paragraph) (DOS Files) |
^r |
Matches a newline (CR Only) (paragraph) (MAC Files) |
^n |
Matches a newline (LF Only) (paragraph) (UNIX Files) |
^t |
Matches a tab character |
[xyz] |
A character set. Matches any characters between brackets. |
[~xyz] |
A negative character set. Matches any characters NOT between brackets
including newline characters. |
^{ A^}^{B^} |
Matches expression A OR B |
^ |
Overrides the following regular expression character |
^(...^) |
Brackets or tags an expression to use in the replace command. A
regular expression may have up to 9 tagged expressions, numbered according to
their order in the regular expression. |
Note - ^ refers to the character '^' NOT Control Key + value.
Examples:
m?n matches "man",
"men", "min" but not "moon".
t*t matches "test",
"tonight" and "tea time" (the "tea t" portion)
but not "tea
time" (newline between "tea
" and "time").
Te+st matches "test", "
teest", " teeeest" etc. but does not match " tst".
[ aeiou] matches every lowercase vowel
[,.?] matches a literal ",",
"." or "?".
[0-9a-z] matches any digit, or lowercase
letter
[~0-9] matches any character except a
digit (~ means NOT the following)
You may search for an expression A or B as follows:
"^{ John^}^{Tom^}"
This will search for an occurrence of John or Tom. There should be
nothing between the two expressions.
You may combine A or B and C or D in the same search as follows:
"^{ John^}^{Tom^} ^{
Smith^}^{Jones^}"
This will search for John or Tom followed by Smith or Jones.
The table below shows the syntax for the "Unix" style
regular expressions.
Regular Expressions (Unix Syntax):
Symbol |
Function |
\ |
Indicates the next character has a special meaning.
"n" on it's own matches the character "n". "\n"
matches a linefeed or newline character. See examples below (\d, \f, \n etc). |
^ |
Matches/anchors the beginning of line. |
$ |
Matches/anchors the end of line. |
* |
Matches the preceding character zero or more times. |
+ |
Matches the preceding character one or more times. Does not
match repeated newlines. |
. |
Matches any single character except a newline character. Does not
match repeated newlines. |
(expression) |
Brackets or tags an expression to use in the replace command. A
regular expression may have up to 9 tagged expressions, numbered according to
their order in the regular expression. |
[xyz] |
A character set. Matches any characters between brackets. |
[^xyz] |
A negative character set. Matches any characters NOT between
brackets including newline characters. |
\d |
Matches a digit character. Equivalent to [0-9]. |
\D |
Matches a nondigit character. Equivalent to [^0-9]. |
\f |
Matches a form-feed character. |
\n |
Matches a linefeed character. |
\r |
Matches a carriage return character. |
\s |
Matches any whitespace including space, tab, form-feed, etc but
not newline. |
\S |
Matches any non-whitespace character but not newline. |
\t |
Matches a tab character. |
\v |
Matches a vertical tab character. |
\w |
Matches any word character including underscore. |
\W |
Matches any nonword character. |
\p |
Matches CR/LF (same as \ r\n) to match a DOS line terminator. |
Note - ^ refers to the character '^' NOT Control Key + value.
Examples:
m.n matches "man",
"men", "min" but not "moon".
Te+st matches "test", "
teest", " teeeest" etc. BUT NOT " tst".
Te*st matches "test", "
teest", " teeeest" etc. AND " tst".
[ aeiou] matches every lowercase vowel
[,.?] matches a literal ",",
"." or "?".
[0-9a-z] matches any digit, or lowercase
letter
[^0-9] matches any character except a
digit (^ means NOT the following)
You may search for an expression A or B as follows:
"( John|Tom)"
This will search for an occurrence of John or Tom. There should be
nothing between the two expressions.
You may combine A or B and C or D in the same search as follows:
"( John|Tom) ( Smith|Jones)"
This will search for John or Tom followed by Smith or Jones.
If Regular Expressions is not selected (i.e. no usage of Regular Expressions is active)
for a find/replace the following special characters are also valid in the Find
and Replace fields:
Symbol |
Function |
^^ |
Matches a "^" character |
^s |
Is substituted with the selected (highlighted) text of the
active file window. |
^c |
Is substituted with the contents of the clipboard. |
^b |
Matches a page break |
^p |
Matches a newline (CR/LF) (paragraph) (DOS Files) |
^r |
Matches a newline (CR Only) (paragraph) (MAC Files) |
^n |
Matches a newline (LF Only) (paragraph) (UNIX Files) |
^t |
Matches a tab character |
Note - ^ refers to the character '^' NOT Control Key + value.
For information
regarding Perl Compatible Regular Expressions please click here.
Liangjh@CCF
------------------------------------------------------
?????????????????????????????????????????????????????????????????????????????? ???
------------------------------------------------------
???????????????
??????
?1? ????????????????
?2? ???????????----------------------------Microshaoft,jiuk2k
?3? ???????????????????
?4? ??????????????????
?5? ???????????----------------------------???
?1?????????????????
?????????
abc aaaaa
123 abc 444
??????abc????abc???????????abc efg
????????????
abc efg
123 abc efg
???
? ??????????????abc.*
? ???????????????????????
???????????
. ???????
* ???0????
?????????????????????????????????????????????????????????????
?2????????????
???
asdadas123asdasdas456asdasdasd789asdasd
???:
asdadas[123]asdasdas[456]asdasdasd[789]asdasd
????????????????????
?????????[0-9][0-9][0-9]?????
???:????[\0\1\2]?????
????????????????????
?????????????????[0-9]????0?9??????????[a-z]?????a?z???????
???????[0-9]????????????
\0?????[0-9]??????\1?????[0-9]??????????
[?]???????????[?]???????\0\1\2??????????
asdadas??123??asdasdas??456??asdasdasd??789??asdasd
?????by jiuk2k??
???????[0-9][0-9][0-9]??[0-9]*[0-9]???1 ? 123 ? 12345 ? ...
????????
?????????????????????????????
?3????????????????????
???????????????,??????????????
??
12345 1265345
2345
?????????345
?????????????????????????????????????????????????????????????????
???
??????????????????
?????????345$
??$???????
???????????^?????? EditPlus ????????????????????
a. ???????
b. ???????????
c. ?????????????????????
?4???????????????????
???????????????
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
htmlAdWH('93163607', '728', '90');
//-->
</SCRIPT>
???????????????search & replace????????????????
EditPlus ??????????????????????????????
???????? Editplus ???????????(?)????????????????????????????
<SCRIPT LANGUAGE="JavaScript1.1">\n<!--\nhtmlAdWH('93163607', '728', '90'.);\n//-->\n</SCRIPT>\n
??????????????????????????(?)?????????????????.??????
<SCRIPT LANGUAGE="JavaScript1.1">\n<!--\nhtmlAdWH.'93163607', '728', '90'.;\n//-->\n</SCRIPT>\n
??????????????????????????
?5????????????
??EditPlus??????????????
?????????????????????????????????????????????????????????????????????????????????
????????????????????????
?????????????????????????????????????????????????????????????????????????????????????????????????????
???"??"????????^[ \t]*\n???\t??????
?1???????????????????????^???????????????????????
?2?????????????^????????[]????????????????????????????????????????????????
?3????????????????????????????
?4???????????????\t?
?5??????????????]????????? 0 ???????????????*????????????[]????????????????0?????
?6?????????\n???????
????????????????????????????????????????????????????????EditPlus????????????????????????????BUG???????????
?6??????????????
EditPlus ?????????? UltraEdit ??????????????????????????
????????????????????????????????????????????????????????
Ctrl+F ? ???????
Ctrl+H ? ???????
Alt+F4 ? ??????????????????????????
????????????????????????????????????
?7????????????????
???????????????????????????????????????????????
?8????????? EditPlus ???????????????
????? EditPlus ????????????????????????????????????????????? EditPlus ?????????".txt"?????????
????:
? ?????????????template.txt
? ????????????????????????????????Text???template.txt???????
? ??????text??????????????????????????????".txt"?????????????
? ?????????template.ini????????????????????
?????????
????????????????????
?9?????????????? *.stx ?????
???????????????????????????? EditPlus ?????????????????????????????????????????????? EditPlus ??????????
?????
?????????? Setting.ini ?? EditPlus ???????
?????.stx?acp??????????????????????
Syntax file=C:\Program Files\EditPlus 2\cpp.stx
?????C:\Program Files\EditPlus 2\????????????
????????????????
?10???????editplus??????????
?editplus?????????????????????????????????????????????????????????????????????????????????????????????????
?11?????FTP ?????
??->????->FTP ???????????????????????/?/web/????????FTP ?????????????????????????
?12????????????????
??????????????'?????????????
?13??????????????????????????
??? *.STX??????? *.ACP?????????
1. ?????????
2. ??????????????????????????.?
3. ??/?? STX???????? ?? ACP???????????
????????*.CTL?
???? *.CTL ?????????????? EditPlus ?????????
?14?????????????Java?Borland C++?Visual C++?Inno Setup?nsis?
???????????????????????
? ??????????????
? ????????????????????
? ????"$(FilePath)"????????????????????????????
?? ??
$(FilePath) ??????????????????
$(FileDir) ???????????
$(FileName) ?????????
$(FileNameNoExt) ???????????????
$(FileExt) ?????????
$(ProjectName) ???????????
$(CurLine) ??????????????
$(CurCol) ??????????????
$(CurSel) ??????????????
$(CurWord) ????????????
$(WindowList) ???????????????
?? 1. Java ???
?????Java ???
???c:\java\bin\javac.exe
???"$(FilePath)"
?????$(FileDir)
???????
??????? Java ??????????????
?????Java
???c:\java\bin\java.exe
???$(FileNameNoExt)
?????$(FileDir)
???????????? Java ???????
?? 2. Borland C++
?????Borland C
???c:\bc\bin\bcc32.exe
???-Ic:\bc\include -Lc:\bc\lib -n$(FileDir) $(FilePath)
?????c:\bc\bin
???????
?? 3. Visual C++
?????Visual C++
???c:\msdev\vc98\bin\cl.exe
???"$(FilePath)"
?????$(FileDir)
???????
?? 4. Inno Setup
??????? Inno
???C:\Program Files\Inno Setup 4\Compil32.exe
???/cc $(FileName)
?????$(FileDir)
???????
?? 5. nsis
??????? nsis
???C:\NSIS\makensis.exe
???$(FileName)
?????$(FileDir)
???????
?? 6. C#
??????? C#
???C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\csc.exe
???$(FileName)
?????$(FileDir)
???????
???????????????????????????????
???????????????????????????????????????????????(Ctrl + 0-9) ?????????????????????
??????? *.exe ???????????????????????????????
?????Run
???$(FileNameNoExt)
???
?????$(FileDir)
?15????? ?Editplus??PHP??
1:??Editplus???"??->??????..."???
2:?????????"????->????",????????????????????"Debug PHP",?"????"???"Debug PHP"???"???"?????,????php.exe???????????"c:\php\php.exe"????"??"?????????"????",????"????"?????????
3:???????????php???????Ctrl+1?????????????(??????????,??????????),???????????????????????????:????PHP????,?????????????? ,???????,Editplus???????????????????????????????
4:????????????????????"Debug PHP"?????"????"??????"????"??,????????????????"????????"????????, ?"?????"??????????" ^.+ in (.+) line ([0-9]+) "(?????),?????????????????????????????????"???"???????"????? 1"????????????????,"?"???????"????? 2"?"?"???????????????
5:????????????????????Editplus?????????????????????,?????????!
??,Editplus?????"??",?????????PHP?????????"???"??????????????????????????Editplus????????????????????????????????????^O^
???????????????????? ?by aukw?
1.php.ini ?html_errors = Off??
//???????3.????????
2.?????-q -f "$(FilePath)"
//??"???????????????????
//-q???html????????????????????????header??
3." ^.+ in (.+) line ([0-9]+) " ?? "^.+ in (.+) on line ([0-9]+)$"
//???????????????????????????????
?16??????? PHP ????(?)
1: ??????? PHP4 Functions ????????, ??[??]->[????]??,????????????? PHP ??(???? F2 ?)
2: ????,????????,?????????(? F2)
3: ?[????]->[?????]->PHP->????, ?????? php.acp ??,??????????????.
4: ????????,??[????]->[??]->WEB ???????????(????? http:// , ?????????)?
?????: ??->localhost/php | ???->D:\php
??->localhost/asp | ???->D:\asp
??->localhost/cgi | ???->D:\cgi
??????????????????(???????), ???????.
5: ???????????? www.editplus.com ??????????????
6: Ctrl+F11 ?????????????.
7: ????????.?:
??MYSQL???????->C:\mysql\bin\winmysqladmin.exe
??Apache???->C:\Apache\bin\Apache.exe -k start
??Apache???->C:\Apache\bin\Apache.exe -k stop (shutdown)
8: DBG ????? prof_results.php ??,??? PHP ?????.
?????????,?????.
OK! ?????,???????? IDE ??????,??????...???,??:
9: ? php_manual_en.chm (?????????)????????, ????????????, ???????, ????? Ctrl+1, ????.
??????????????, ???? 1 ????????, ??...????
??????????????????????????????????????????????????????
?17?? WINPE ??? EDITPLUS
???????bartpe??WINPE??????nu2menu??
????? \programs\editplus\
?????????? i386 ??
i386/system32 ? autorun.bat ?????????????
regedit /s %SystemDrive%\programs\editplus\REG.REG
regsvr32 /s \programs\editplus\EPPSHELL.DLL
??editplus?????????programs\editplus\???????setting.ini???????nu2menu??????????????????????
<MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetProgramDrive()\Programs\EditPlus\editplus.exe))" CMD="RUN"
FUNC="@GetProgramDrive()\Programs\EditPlus\editplus.exe">EditPlus ????</MITEM>