锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
\t Tab瀛楃
\n 鏂拌
. 鍖歸厤浠繪剰瀛楃
| 鍖歸厤"宸﹁竟鍜屽彸杈?鐨勫瓧絎︿覆, 渚嬪: "ac|ad" 鍖歸厤 "ac" 鍜?"ad"
[] 鍖歸厤鎵鏈夊湪 絎﹀彿"[]"闂悎鍖洪棿鍐?/strong> 鐨勪換鎰忓瓧絎? 渚嬪: "[ab]" matches "a" and "b". "[0-9]" matches any digit.
[^] 鍖歸厤鎵鏈変笉鍦?nbsp; 絎﹀彿"[]"闂悎鍖洪棿鍐?/strong> 鐨勪換鎰忓瓧絎? 渚嬪: "[^ab]" 鍖歸厤鎵鏈夐櫎浜?a"鍜?b"涔嬪鐨勫瓧絎? "[^0-9]" 鍖歸厤鎵鏈夐潪鏁板瓧瀛楃
* 鍖歸厤絎﹀彿"*"鐨勫乏杈瑰瓧絎?0嬈℃垨澶氭) 渚嬪:"be*" 鍖歸厤 "b", "be" , "bee"
+ 鍖歸厤絎﹀彿"+"鐨勫乏杈瑰瓧絎?1嬈℃垨澶氭) 渚嬪:"be+" 鍖歸厤 "be" and "bee", 浣嗕笉鍖歸厤 "b"
? 鍖歸厤絎﹀彿"?"鐨勫乏杈瑰瓧絎?0嬈℃垨1嬈? 渚嬪:be?" 鍖歸厤 "b" 鍜?"be", 浣嗕笉鍖歸厤 "bee"
^ 鍖歸厤絎﹀彿"^"鐨勫彸杈瑰瓧絎︿覆, 騫朵笖璇ュ瓧絎︿覆蹇呴』鍦ㄨ棣? 渚嬪: ^AB 鍖歸厤瀛楃涓?AB",騫朵笖璇?AB"蹇呴』鍦ㄨ棣?br>$ 鍖歸厤絎﹀彿"$"鐨勫乏杈瑰瓧絎︿覆, 騫朵笖璇ュ瓧絎︿覆蹇呴』鍦ㄨ灝? 渚嬪: AB$ 鍖歸厤瀛楃涓?AB",騫朵笖璇?AB"蹇呴』鍦ㄨ灝?br>() Affects evaluation order of expression and also used for tagged expression.
\ Escape character. If you want to use character "\" itself, you should use "\\".
鎶宸?
1. 鏌ユ壘絀鴻 : "^[ \t]*\n"
2. 鏌ユ壘琛岄搴忓彿: "^[0-9. ]+"
渚嬪:
"
1. aaaa
2. bbbb
:
100. abcd
:
"
3. 鏌ユ壘"["鍜?]"涔嬮棿鐨勫唴瀹? "\[.+\]"
4. 鍖歸厤<b></b>涔嬮棿鐨勫唴瀹?鍖呮嫭<b></b>):"^\<b\>.+\</b\>"
5. 鍖歸厤<b>...<br/>涔嬮棿娌℃湁"/"瀛楃鐨勫唴瀹?"^\<b\>[^/]+\<br/\>"
渚嬪:
...
<b>appeal</b> - v. to take to <br/>
<b>somebody for help <br/>
<b>appoint</b> - v. to name;<br/>
<b>statues <br/>
...
浣跨敤:^(\<b\>)([^/]+\<br/\>) 鍜屾浛鎹覆"\2", 灝嗕嬌寰椾互涓婄殑絎?琛屽拰絎?琛屽彉鎴?
...
<b>appeal</b> - v. to take to <br/>
somebody for help <br/>
<b>appoint</b> - v. to name;<br/>
statues <br/>
...
The tagged expression is enclosed by (). Tagged expressions can be referenced by \0, \1, \2, \3, etc. \0 indicates a tagged expression representing the entire substring that was matched. \1 indicates the first tagged expression, \2 is the second, etc. See following examples.
Original Search Replace Result
abc (ab)(c) \0-\1-\2 abc-ab-c
abc a(b)(c) \0-\1-\2 abc-b-c
abc (a)b(c) \0-\1-\2 abc-a-c