-
Notifications
You must be signed in to change notification settings - Fork 0
/
regex_demo.txt
37 lines (37 loc) · 1.09 KB
/
regex_demo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 匹配以<开头以>结尾中间含有任意字符的标签字符串
<[\S\s]+?>
\w+=\d+
( \w+=\d+)+
<\w+( \w+=\d+)+
\w+='[\s\S]+?'
(?<s>'[\S\f\r\t\v (?:\n)]+?')
(?<s>\w+='[\S]+)[\n\v]
(?<head><[\w]+)
\w+='([\S ]+\n)?
(?<stylehead>style=')
(?<stylehead>style=['"])[\S\d-_:]+?\n
style=['"][\S\n]+?['"]
# 匹配td标签头
(?:<td[\s\S]+?>)
# 匹配td标签尾
(?:</td>)
# td捕获标签内容 2018年8月25日22:09:32
(?:<td[\s\S]+?>)(?<s>[\S\s]{0,}?)?(?:</td>)
# span标签头
<span[\w\S\s]+?>
# span标签尾
</span>
# span完整标签
<span[\w\S\s]+?>[\S\s]+?</span>
# span 只捕获标签内容
(?:<span[\w\S\s]+?>)(?<content>[\S\s]*?)(?:</span>)
(?:<td[\S\s]+?>)(?<content>[\S\s]*?)(?:</td>)
#
(<td[\s\S]+?>)([^</td>])(?:<toggleline>\n)*(.*)(</td>)
#匹配td标签内部的换行符 2018年8月26日15:02:56
(?<s1><td[\s\S]*?>)(?<content>[(?:\n)\S]*)(?<s2></td>)
(?<s1><td[\s\S]*?>)[(?<nline>\n)(?<content>\S)]*(?<s2></td>)
#匹配el-input元素中不带有clearable属性的标签 v1
<el-input((?!clearable).)*?>
#匹配el-input元素中不带有clearable属性的标签 v2
(<el-input)(((?!clearable).)*?>)