国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 應用 > 軟件技巧 > 正文

EditPlus中的正則表達式中英文使用詳解(附常用實例)

2024-07-16 17:45:20
字體:
來源:轉載
供稿:網友

EditPlus中的正則表達式中英文詳解(附常用實例)

/t Tab character.tab符號
/n New line.新的一行(換行符)
. Matches any character.任何字符
| Either expression on its left and right side matches the target string.For example, “a|b” matches “a” and “b”.|符號兩邊的都匹配
[] Any of the enclosed characters may match the target character.For example, “[ab]” matches “a” and “b”. “[0-9]” matches any digit.用[]括起來的都匹配
[^] None of the enclosed characters may match the target character.For example, “[^ab]” matches all character EXCEPT “a” and “b”.“[^0-9]” matches any non-digit character.用[]括起來的都“不匹配”
* Character to the left of asterisk in the expression should match 0 or more times.For example “be*” matches “b”, “be” and “bee”.“*”號左邊的那個字符匹配0次或者更多次
+ Character to the left of plus sign in the expression should match 1 or more times.For example “be+” matches “be” and “bee” but not “b”.“*”號左邊的那個字符匹配1次或者更多次
? Character to the left of question mark in the expression should match 0 or 1 time.For example “be?” matches “b” and “be” but not “bee”.“*”號左邊的那個字符匹配0次或者1次
^ Expression to the right of ^ matches only when it is at the beginning of line.For example “^A” matches an “A” that is only at the beginning of line.只匹配以“^”號右邊的字符為一行開頭的字符。
$ Expression to the left of $ matches only when it is at the end of line.For example “e$” matches an “e” that is only at the end of line.只匹配以“$”號左邊的字符為一行結束的字符。
() Affects evaluation order of expression and also used for tagged expression.標示表達式區域
/ scape character. If you want to use character “/” itself, you should use “//”.轉義字符,如果你想匹配"/"。請使用"//"
/0你使用正則表達式找到的東西

常用EditPlus正則表達式實例

把img標簽的alt去掉
搜索內容:alt="[^src| ]* 注:"|"符號后有個空格
替換內容:alt=""

把帶屬性和樣式的<font>標簽去掉
第一步:把</font>去掉。
搜索內容:</font>
替換內容:不填

第二步:去掉帶屬性和樣式的<font>標簽
搜索內容:<font [^>]*>
替換內容:不填

去掉所有的空行
搜索內容:/n/n
替換內容:/n

以下是針對特殊中文的一些替換

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 剑河县| 中山市| 武隆县| 揭阳市| 忻城县| 綦江县| 临洮县| 泗洪县| 甘洛县| 苗栗县| 腾冲县| 玉林市| 自治县| 台南县| 沈阳市| 金溪县| 安福县| 麻城市| 丰宁| 马尔康县| 南安市| 辽阳县| 马龙县| 崇信县| 光山县| 博湖县| 双流县| 富川| 潞西市| 隆德县| 尼勒克县| 喜德县| 盘锦市| 汤阴县| 松滋市| 佳木斯市| 高雄县| 贡嘎县| 靖边县| 杭锦后旗| 麟游县|