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

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

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

2024-07-15 01:59:41
字體:
來源:轉載
供稿:網友

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

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 石林| 女性| 乌兰县| 江阴市| 抚顺县| 浪卡子县| 九龙县| 永清县| 札达县| 汝城县| 内江市| 重庆市| 芒康县| 防城港市| 娱乐| 会理县| 安远县| 银川市| 奉贤区| 安达市| 锦州市| 祁阳县| 莱阳市| 彝良县| 阜康市| 栾城县| 高雄县| 高清| 炉霍县| 福州市| 绥芬河市| 蕉岭县| 绥宁县| 高安市| 新和县| 乌兰察布市| 徐汇区| 化德县| 东乌珠穆沁旗| 翁牛特旗| 孟村|