目录

前言 1.1

正则应用概述 1.2

正则应用举例 1.3

JavaScript 1.3.1

Python 1.3.2

re 1.3.2.1

BeautifulSoup 1.3.2.2

数据库 1.3.3

MongoDB 1.3.3.1

MongoDB Compass 1.3.3.2

编辑器和IDE 1.3.4

Sublime 1.3.4.1

VSCode 1.3.4.2

crifan电子书中链接替换 1.3.4.2.1

cookie转dict 1.3.4.2.2

城市名称 1.3.4.2.3

mp3文件名和地址 1.3.4.2.4

提取104协议示例数据 1.3.4.2.5

Markdown图片文件名 1.3.4.2.6

xml中符号 1.3.4.2.7

表格转Markdown 1.3.4.2.8

url中qs处理 1.3.4.2.9

print转logging 1.3.4.2.10

多余的lession单词 1.3.4.2.11

标题链接转Markdown 1.3.4.2.12

json字符串变列表 1.3.4.2.13

提取历史版本 1.3.4.2.14

srt字幕字体大小 1.3.4.2.15

cvs中等号 1.3.4.2.16

文章段落加换行 1.3.4.2.17

url中qs参数变字典 1.3.4.2.18

单词加引号 1.3.4.2.19

去除多余换行 1.3.4.2.20

EF下标加粗 1.3.4.2.21

只保留文件名 1.3.4.2.22

get函数被调用的地方 1.3.4.2.23

15秒相关的地方 1.3.4.2.24

地址变url 1.3.4.2.25

单行变多行 1.3.4.2.26

标题转Markdown 1.3.4.2.27

Cycript中保留类名 1.3.4.2.28

os_log转dylibLog 1.3.4.2.29

InstallHook函数名 1.3.4.2.30

iPhone机型处理 1.3.4.2.31

去除IP地址的行 1.3.4.2.32

生成POS列表 1.3.4.2.33

正则的group的可选项 1.3.4.2.34

过滤出html的tab标签列表 1.3.4.2.35

css提取属性key 1.3.4.2.36

只保留游戏名后加上顿号 1.3.4.2.37

附录 1.4

参考资料 1.4.1

前言

正则表达式应用举例

最新版本：v2.1.0

更新时间：20241002

简介

整理正则表达式各个领域的应用，并给出实际使用案例，包括各种编程语言中的实例，比如Javascript、Python中的re模块和库BeautifulSoup、数据库中的MongoDB和MongoDB Compass，以及编辑器中的实例，包括Sublime、以及对正则支持的很好也很好用的VSCode。尤其是给VSCode加上了很多大大小小的正则使用的例子，列出了替换前后的效果和具体应用场景。

源码+浏览+下载

本书的各种源码、在线浏览地址、多种格式文件下载如下：

HonKit源码

crifan/regex_usage_examples: 正则表达式应用举例

如何使用此HonKit源码去生成发布为电子书

详见：crifan/honkit_template: demo how to use crifan honkit template and demo

在线浏览

正则表达式应用举例 book.crifan.org

正则表达式应用举例 crifan.github.io

离线下载阅读

正则表达式应用举例 PDF

正则表达式应用举例 ePub

正则表达式应用举例 Mobi

版权和用途说明

此电子书教程的全部内容，如无特别说明，均为本人原创。其中部分内容参考自网络，均已备注了出处。如发现有侵权，请通过邮箱联系我 admin 艾特 crifan.com，我会尽快删除。谢谢合作。

各种技术类教程，仅作为学习和研究使用。请勿用于任何非法用途。如有非法用途，均与本人无关。

鸣谢

感谢我的老婆陈雪的包容理解和悉心照料，才使得我crifan有更多精力去专注技术专研和整理归纳出这些电子书和技术教程，特此鸣谢。

其他

作者的其他电子书

本人crifan还写了其他150+本电子书教程，感兴趣可移步至：

crifan/crifan_ebook_readme: Crifan的电子书的使用说明

关于作者

关于作者更多介绍，详见：

关于CrifanLi李茂 – 在路上

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-10-02 09:46:25

正则应用概述

正则应用概述

如 应用广泛的超强搜索：正则表达式所说，正则的用途非常广泛，下面来整理各个领域内正则的用途和具体例子。

目的在于：

没听过正则的人：了解正则在搜索和替换等方面的功能是多么强大

听过正则但不熟悉的人：能大概了解不同领域内，正则大概是怎么使用的

需要使用正则的人：借鉴正则的写法，在需要的时候，自己写正则，满足自己的需求

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13

正则应用举例

正则应用举例

下面来介绍正则表达式在不同领域的各种应用。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13

JavaScript

JavaScript

代码：

    let cowCodeRegex = new RegExp("/cowActivity/([^/]+)", "g");
    console.log(`cowCodeRegex=${cowCodeRegex}`);
    let foundCowCode = cowCodeRegex.exec(this.state.curUrl); ///uapp/cowActivity/12-0985/1/1522936800000
    console.log(`foundCowCode=${foundCowCode}`); ///cowActivity/13-6234,13-6234
    let cowCode = null;
    if (foundCowCode) {
      let inputStr = foundCowCode[0];
      console.log(`inputStr=${inputStr}`); ///uapp/cowActivity/11-5953
      cowCode = foundCowCode[1];
      console.log(`cowCode=${cowCode}`); //11-5953
    }

输出：

parsePageType: currentUrl=/uapp/cowActivity/12-0985/1/1522936800000 -> page=牛只活动量
index.js?5c2a:528 cowCodeRegex=/\/cowActivity\/([^\/]+)/g
index.js?5c2a:530 foundCowCode=/cowActivity/12-0985,12-0985
index.js?5c2a:534 inputStr=/cowActivity/12-0985
index.js?5c2a:536 cowCode=12-0985
index.js?5c2a:540 fullTitle=牛只活动量 12-0985

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13

Python

Python

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13

re

re

Python中有专门的正则的模块：

概述

Python中的re模块

文档

中文

re --- 正则表达式操作 — Python 3.12.7 文档

英文

re — Regular expression operations — Python 3.12.7 documentation

常用函数

通用

编译表达式

re.compile

re.compile(pattern, flags=0)

查找

re.search

re.search(pattern, string, flags=0)

re.findall

re.findall(pattern, string, flags=0)

匹配

re.match

re.match(pattern, string, flags=0)

替换

re.sub

re.sub(pattern, repl, string, count=0, flags=0)

详解

Python中正则表达式：re模块详解

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-10-02 09:38:12

BeautifulSoup

BeautifulSoup

BeautifulSoup中的find和findAll的name或attr参数，支持正则写法：

代码：

h1userSoupList = soup.findAll(name="h1", attrs={"class":re.compile(r"h1user(\s\w+)?")});

可以从html：

<div class="icon_col">
        <h1 class="h1user">crifan</h1>
        <h1 class="h1user test1">crifan 123</h1>
        <h1 class="h1user test2">crifan 456</h1>
</div>

搜到列表：

class="h1user"
class="h1user test1"
class="h1user test2"

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13

数据库

数据库

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13

MongoDB

MongoDB

相关代码：

if args.get('title'):
    filters['title'] = {'$regex': args['title'], '$options': 'i'}

if args.get('unitCode'):
    filters['unit_code'] = {'$regex': args['unitCode'], '$options': 'i'}

其中的$regex表示搜索时，用正则搜索

-》此处含义是：去搜索title和unitCode两个字段，且i表示不区分大小写

具体详见：

高级搜索 · 主流文档型数据库：MongoDB (crifan.org)

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-10-02 09:42:55

MongoDB Compass

MongoDB Compass

MongoDB Compass中想要用正则搜索字段：

grading
    lexile: "AD450L"

写法是：

{"grading.lexile": {$regex: "AD.*"}}

或：regex加上行首和行尾判断：

{"grading.lexile": {$regex: "^AD.*$"}}

或 regex用引号引起来

{"grading.lexile": {"$regex": "AD.*"}}

具体详见：

高级搜索 · 主流文档型数据库：MongoDB (crifan.org)

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-10-02 09:42:48

编辑器和IDE

编辑器和IDE

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13

Sublime

Sublime

提取youtube网页返回的html中包含的子页面的url地址

比如，用：

"url":"/watch\?v=[\w\-]{11}?\\u0026list=[\w\-]+\\u0026index=\d+"

可以从一堆的js中的script的值中：

{"webCommandMetadata":{"url":"/watch?v=23t1f8d2ISs\u0026list=PLHOR8x-IicVJDAmJWZmJ-IMu1x3lTAld5\u0026index=1",”webPageType"

{"webCommandMetadata":{"url":"/watch?v=au7Nkr-5MA8\u0026list=PLHOR8x-IicVJDAmJWZmJ-IMu1x3lTAld5\u0026index=14",”webPageType"

搜索出所要的内容，此处有77个符合需要的内容：1/77

点击Find，继续向下找，比如找到第14个：14/77

另外，进一步的举例：

此处，对应着页面上的其实只是希望找到66个地址就可以了：

但是此处找到77个，多出11个，则是由于：

此处的js的变量的值中，包含了不需要的额外的11个

所以此时，由于没法方便的从字符串中区别开来，不好去掉另外那11个，则只能：

想办法拿到js的变量值，然后通过转换为json，然后再去获取json对象中的值，即可准确的得到所需要的值。

所以此处，又可以接着通过正则去先得到js的变量的值：

用正则：

window\["ytInitialData"\]\s*=\s*

;\s+window\["ytInitialPlayerResponse"\]

从：

  <script >
    window["ytInitialData"] = {"responseContext”:
...
xqmOCnbELAge-VPNjlN1SqHurYg"}};
    window["ytInitialPlayerResponse"] = (

中，搜索到所要的内容：

而首尾的正则之间的内容，就是需要找的js的变量的值，是个json

对应着写个完整的正则：

window\["ytInitialData"\]\s*=\s*(.+?);\s+window\["ytInitialPlayerResponse"\]

就可以匹配到这段完整的内容了：

后续就可以通过解析json去精确获取所要的url的值了。

比如第12个url：

由此实现了：

根据自己的实际的（业务）需求，通过充分利用正则表达式，获取想要的符合特定某一规则的内容。

html中提取出浙江省的每个市到Xmind中

<div class="menu transition visible" tabindex="-1" style="display: block !important;"><div class="item selected" data-value="330100">杭州市</div><div class="item" data-value="330200">宁波市</div><div class="item" data-value="330300">温州市</div><div class="item" data-value="330400">嘉兴市</div><div class="item" data-value="330500">湖州市</div><div class="item" data-value="330600">绍兴市</div><div class="item" data-value="330700">金华市</div><div class="item" data-value="330800">衢州市</div><div class="item" data-value="330900">舟山市</div><div class="item" data-value="331000">台州市</div><div class="item" data-value="331100">丽水市</div></div>

希望提取出每个市

正则写法：

查找Find：<div.*?data-value="\d+">(\S+?)</div>

替换Replace：$1\r\n

点击Replace All：

替换成：

忽略掉最后的</div>，拷贝出来，即可得到我要的所有的市：

杭州市
宁波市
温州市
嘉兴市
湖州市
绍兴市
金华市
衢州市
舟山市
台州市
丽水市

->

如此继续重复此步骤，直到把网页中的内容：

分多次，但是是批量的：

全部都整理到Xmind中：

就不用一个个拷贝，一个个粘贴了 -》 从而提高工作效率。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-10-02 09:44:05

VSCode

VSCode

VSCode中正则语法说明

替换中引用搜索中的分组

背景：搜索带分组

写法：(xxx)

语法：替换时引用对应分组，用：$N

N=1,2,3,...

举例

例子

搜索：(\w+)\n

替换："$1",\n

环视

可以参考自己的教程

环视断言 · 应用广泛的超强搜索：正则表达式

核心要点和举例

(?=xxx): (positive) look ahead (assertion)=正向肯定断言

(?!xxx): negative look ahead (assertion)=正向否定断言

(?<=xxx): (positive) look behind (assertion)=反向肯定断言

例子1：

(?<!\s)<([\.\w]+)>
&lt;$1&gt;

(?<!xxx): negative look behind (assertion)=反向否定断言

例子1

(?<!http\.)get\(

例子2

(?<!")15(?!")

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13

crifan电子书中链接替换

crifan电子书中链接替换

对于我的电子书的说明：

https://github.com/crifan/crifan_ebook_readme

的markdown源码：

想要把其中的地址：

https://crifan.github.io/xxx/website

替换为：

https://book.crifan.com/books/xxx/website/

比如：

https://crifan.github.io/program_code_style/website

替换成：

https://book.crifan.com/books/program_code_style/website/

用正则：

https?://crifan.github.io/(\w+)/website/?
https://book.crifan.com/books/$1/website/

实现从：

替换成：

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:22:29

cookie转dict

将Chrome中拷贝出来的cookie处理成代码中要的dict

Chrome中拷贝出来的cookie是：

welcomeflash=20050606_107001; zzpaneluin=; zzpanelkey=; pgv_pvi=7640393728; pgv_si=s3147298816; pgv_pvid=3951804270; pgv_info=ssid=s7487670374; ptisp=ctc; ptui_loginuin=2539619267; pt2gguin=o2539619267; uin=o2539619267; skey=@nDTkOJm1m; RK=Ye5Jmtb0ly; ptcz=3b6806bf7cddc375bc2d23b04ff9c366b47fac808b9256322ad69a23f2dc580f; p_uin=o2539619267; pt4_token=aC5vGfNAA2M3fS7ngcAHdXoiCvqwrAGcEuL54gs63oE_; p_skey=kSC7q75Gk93gLlo*mRMg*h2m3iYUuubjQqVBIgEMi*o_; Loading=Yes

最后加上分号：

welcomeflash=20050606_107001; zzpaneluin=; zzpanelkey=; pgv_pvi=7640393728; pgv_si=s3147298816; pgv_pvid=3951804270; pgv_info=ssid=s7487670374; ptisp=ctc; ptui_loginuin=2539619267; pt2gguin=o2539619267; uin=o2539619267; skey=@nDTkOJm1m; RK=Ye5Jmtb0ly; ptcz=3b6806bf7cddc375bc2d23b04ff9c366b47fac808b9256322ad69a23f2dc580f; p_uin=o2539619267; pt4_token=aC5vGfNAA2M3fS7ngcAHdXoiCvqwrAGcEuL54gs63oE_; p_skey=kSC7q75Gk93gLlo*mRMg*h2m3iYUuubjQqVBIgEMi*o_; Loading=Yes;

再去用正则：

(\w+)=([^,^=]*); ?
"$1": "$2",\n

替换：

成自己要的dict的内容：

中间有个特殊的，自己手动改一下即可：

"welcomeflash": "20050606_107001",
"zzpaneluin": "",
"zzpanelkey": "",
"pgv_pvi": "7640393728",
"pgv_si": "s3147298816",
"pgv_pvid": "3951804270",
"pgv_info": "ssid=s7487670374",
"ptisp": "ctc",
"ptui_loginuin": "2539619267",
"pt2gguin": "o2539619267",
"uin": "o2539619267",
"skey": "@nDTkOJm1m",
"RK": "Ye5Jmtb0ly",
"ptcz": "3b6806bf7cddc375bc2d23b04ff9c366b47fac808b9256322ad69a23f2dc580f",
"p_uin": "o2539619267",
"pt4_token": "aC5vGfNAA2M3fS7ngcAHdXoiCvqwrAGcEuL54gs63oE_",
"p_skey": "kSC7q75Gk93gLlo*mRMg*h2m3iYUuubjQqVBIgEMi*o_",
"Loading": "Yes;",

粘贴到代码中即可使用了：

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:23:15

城市名称

处理得到城市名称

除了：

【整理】中国常见的城市的名字

以及：

对于：

https://en.wikipedia.org/wiki/List_of_urban_areas_by_population

中的城市名，用正则：

\[\d+\]

去除掉[数字]

从：

替换成：

以及继续用：

\(([\w\s]+)\)$
$1

把(xxx)中的xxx放到下一行

从：

替换成：

当然，也注意到了，没有匹配到：

Nagoya (Chūkyō)

是因为里面有unicode的字符，由于数量不多，手动处理即可。

再去用：

–([\w\s]+)
\n$1

把xxx-yyy中的yyy放到下一行

替换成：

以及，用：

\s*\(.+\)$

把xxx (yyy)中的空格(yyy)去掉：

替换成：

再继续，用：

^\s
\n

可以找到：

有哪些单词在行首有多余的空格（后续可以再去删除掉）：

![vscode_remove_start_empty.png)

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:23:51

mp3文件名和地址

提取mp3文件名和mp3链接地址

正则：

^[^\r\n]+href="(\w+\](../../../assets/img/vscode_remove_start_empty.png)

## 提取mp3文件名和mp3链接地址

正则：

```bash
^[^\r\n]+href="(\w+\.mp3)"[^\r\n]+$
$1

把：

<img src="/icons/sound2.gif" alt="[SND]"> <a href="e10d3a.mp3">e10d3a.mp3</a> 2015-09-23 09:10 9.3M
<img src="/icons/sound2.gif" alt="[SND]"> <a href="e10d3b.mp3">e10d3b.mp3</a> 2015-09-23 09:10 7.0M
<img src="/icons/sound2.gif" alt="[SND]"> <a href="e10d5a.mp3">e10d5a.mp3</a> 2015-09-23 09:11 54M

替换为：

e10d3a.mp3
e10d3b.mp3
e10d5a.mp3

再进一步：

用正则：

^[^\r\n]+href="(\w+\.mp3)"[^\r\n]+$
http://media.talkbank.org/CHILDES/Biling/Singapore/$1

从：

<img src="/icons/sound2.gif" alt="[SND]"> <a href="e10d3a.mp3">e10d3a.mp3</a> 2015-09-23 09:10 9.3M
<img src="/icons/sound2.gif" alt="[SND]"> <a href="e10d3b.mp3">e10d3b.mp3</a> 2015-09-23 09:10 7.0M
<img src="/icons/sound2.gif" alt="[SND]"> <a href="e10d5a.mp3">e10d5a.mp3</a> 2015-09-23 09:11 54M

替换和提取出：

http://media.talkbank.org/CHILDES/Biling/Singapore/e10d3a.mp3
http://media.talkbank.org/CHILDES/Biling/Singapore/e10d3b.mp3
http://media.talkbank.org/CHILDES/Biling/Singapore/e10d5a.mp3

详见：

【已解决】VSCode中如何使用正则表达式去替换且被替换中使用分组group

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:24:30

提取104协议示例数据

提取104协议示例数据，并格式化成java代码中字符串数组

从：

EB90EB90(端口号:21站0)[2020/1/6 18:18:58] 发送：
68 04 07 00 00 00
EB90EB90(端口号:21站5)[2020/1/6 18:19:07] 接收：
68 12 E6 B7 00 00 0F 81 05 00 05 00 01 0C 00 95 42 03 00 00
EB90EB90(端口号:21站5)[2020/1/6 18:19:07] 发送：
68 04 01 00 E6 B7
EB90EB90(端口号:21站5)[2020/1/6 18:19:12] 接收：
68 14 E8 B7 00 00 01 87 14 00 05 00 01 00 00 01 01 01 00 00 00 01
EB90EB90(端口号:21站5)[2020/1/6 18:19:12] 发送：
68 04 01 00 E8 B7
EB90EB90(端口号:21站5)[2020/1/6 18:19:17] 接收：
68 59 EA B7 00 00 15 A6 14 00 05 00 01 07 00 02 00 00 00 00 00 EC 5C CB 5C DF 5C 45 00 01 00 FE FF 7C 00 94 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 86 13 00 00 02 00 00 00 00 00 FE FF 00 00 00 00 87 00 00 00 00 00 02 00 00 00 00 00
...
EB90EB90(端口号:21站5)[2020/1/6 23:08:55] 发送：
68 04 01 00 12 D3
EB90EB90(端口号:21站5)[2020/1/6 23:09:00] 接收：
68 59 14 D3 00 00 15 A6 14 00 05 00 01 07 00 02 00 00 00 00 00 BC 5D 88 5D A7 5D 44 00 01 00 FE FF 7C 00 84 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 13 00 00 02 00 00 00 00 00 FE FF 00 00 00 00 B6 00 00 00 00 00 02 00 00 00 00 00
EB90EB90(端口号:21站5)[2020/1/6 23:09:06] 接收：
68 12 16 D3 00 00 0F 81 05 00 05 00 01 0C 00 B6 42 03 00 00
EB90EB90(端口号:21站5)[2020/1/6 23:09:06] 发送：
68 04 01 00 16 D3

提取出：接收：的下一行的一连串数字

（1）先 去除 发送的部分

正则：

^EB.+发送：\n(^.+)$\n

替换成：

（2）再去把接收部分中数字提取出来

从：

EB90EB90(端口号:21站5)[2020/1/6 18:19:07] 接收：
68 12 E6 B7 00 00 0F 81 05 00 05 00 01 0C 00 95 42 03 00 00
EB90EB90(端口号:21站5)[2020/1/6 18:19:12] 接收：
68 14 E8 B7 00 00 01 87 14 00 05 00 01 00 00 01 01 01 00 00 00 01
...
EB90EB90(端口号:21站5)[2020/1/6 23:08:55] 接收：
68 14 12 D3 00 00 01 87 14 00 05 00 01 00 00 01 01 01 00 00 00 01
EB90EB90(端口号:21站5)[2020/1/6 23:09:00] 接收：
68 59 14 D3 00 00 15 A6 14 00 05 00 01 07 00 02 00 00 00 00 00 BC 5D 88 5D A7 5D 44 00 01 00 FE FF 7C 00 84 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 13 00 00 02 00 00 00 00 00 FE FF 00 00 00 00 B6 00 00 00 00 00 02 00 00 00 00 00
EB90EB90(端口号:21站5)[2020/1/6 23:09:06] 接收：
68 12 16 D3 00 00 0F 81 05 00 05 00 01 0C 00 B6 42 03 00 00

用正则：

^EB.+接收：\n(^.+)$
$1

把：

替换成：

得到每一行的数字：

68 12 E6 B7 00 00 0F 81 05 00 05 00 01 0C 00 95 42 03 00 00
68 14 E8 B7 00 00 01 87 14 00 05 00 01 00 00 01 01 01 00 00 00 01
68 59 EA B7 00 00 15 A6 14 00 05 00 01 07 00 02 00 00 00 00 00 EC 5C CB 5C DF 5C 45 00 01 00 FE FF 7C 00 94 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 86 13 00 00 02 00 00 00 00 00 FE FF 00 00 00 00 87 00 00 00 00 00 02 00 00 00 00 00
...
68 12 16 D3 00 00 0F 81 05 00 05 00 01 0C 00 B6 42 03 00 00

（3）再去变成java字符串数组，即给每一行加上前后双引号

用正则：

^(.+)$
                "$1",

把：

变成：

                "68 12 E6 B7 00 00 0F 81 05 00 05 00 01 0C 00 95 42 03 00 00 ",
                "68 14 E8 B7 00 00 01 87 14 00 05 00 01 00 00 01 01 01 00 00 00 01 ",
                "68 59 EA B7 00 00 15 A6 14 00 05 00 01 07 00 02 00 00 00 00 00 EC 5C CB 5C DF 5C 45 00 01 00 FE FF 7C 00 94 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 86 13 00 00 02 00 00 00 00 00 FE FF 00 00 00 00 87 00 00 00 00 00 02 00 00 00 00 00 ",
                "68 12 EC B7 00 00 0F 81 05 00 05 00 01 0C 00 95 42 03 00 00 ",
...
                "68 12 16 D3 00 00 0F 81 05 00 05 00 01 0C 00 B6 42 03 00 00 ",

用于粘贴到代码中使用：

->从而把：

繁琐的，手工的，从原始文件中拷贝和粘贴的重复劳动，

快捷的，自动的，完成，且更准确，不会出现手动操作的失误。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:25:08

Markdown图片文件名

填充Markdown中图片文件名

此处正在写教程期间，正好有个需求：为了避免和消除Markdown中的，关于图片的文件名即image的alt的text是空的警告：

然后正好用正则，去自动填充此处image的alt的text，即图片的文件名

用正则：

!\[\]\(\.\./\.\./assets/img/([^/]+)\.(\w{3})\)
![$1](../../../assets/img/$1.$2)

把：

![sublime_2nd_findall](../../../assets/img/sublime_2nd_findall.png)

![sublime_2nd_replaced](../../../assets/img/sublime_2nd_replaced.png)

![regex_all_city_to_xmind](../../../assets/img/regex_all_city_to_xmind.png)

变成：

![sublime_2nd_findall](../../../assets/img/sublime_2nd_findall.png)

![sublime_2nd_replaced](../../../assets/img/sublime_2nd_replaced.png)

![regex_all_city_to_xmind](../../../assets/img/regex_all_city_to_xmind.png)

即可自动填充image的alt的text，消除Markdown中的警告了。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:25:41

xml中符号

把xml中非法的大于号和小于号替换掉

用正则批量替换：

Callback<([\w\.]+)>
Callback&lt;$1&gt;

从：

  <item name="android.accounts.AccountManager android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt; removeAccount(android.accounts.Account, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
...
  <item name="android.accounts.AccountManager android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt; updateCredentials(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)”>
...

替换成：

  <item name="android.accounts.AccountManager android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt; removeAccount(android.accounts.Account, android.app.Activity, android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;, android.os.Handler)”>
...
  <item name="android.accounts.AccountManager android.accounts.AccountManagerFuture&lt;android.os.Bundle&gt; updateCredentials(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback&lt;android.os.Bundle&gt;, android.os.Handler)">

以及更加复杂一点的：

Android/sdk/platform-tools/api/android/hardware/camera2/annotations.xml

  <item name="android.hardware.camera2.CameraDevice android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int, java.util.Set<java.lang.String>) 0">
    <annotation name="androidx.annotation.IntDef">
      <val name="value" val="{android.hardware.camera2.CameraDevice.TEMPLATE_PREVIEW, android.hardware.camera2.CameraDevice.TEMPLATE_STILL_CAPTURE, android.hardware.camera2.CameraDevice.TEMPLATE_RECORD, android.hardware.camera2.CameraDevice.TEMPLATE_VIDEO_SNAPSHOT, android.hardware.camera2.CameraDevice.TEMPLATE_ZERO_SHUTTER_LAG, android.hardware.camera2.CameraDevice.TEMPLATE_MANUAL}" />
    </annotation>
  </item>

要把其中的：

java.util.Set<java.lang.String>

替换成：

java.util.Set&lt;java.lang.String&gt;

且，又不想

很傻的把前缀写成固定的：java.util.Set

这样前缀换了，就不支持了

虽然此处只有这一个例子，但是还是应该写的更加通用

以及后续打算放到全局去替换的

所以要写成通用的

参考自己教程

环视断言 · 应用广泛的超强搜索：正则表达式

(?=xxx): (positive) look ahead (assertion)=正向肯定断言
(?!xxx): negative look ahead (assertion)=正向否定断言
(?<=xxx): (positive) look behind (assertion)=反向肯定断言
(?<!xxx): negative look behind (assertion)=反向否定断言

然后去写成：

(?<!\s)<([\.\w]+)>
&lt;$1&gt;

即可：只识别中间内容，不会误判

可以把：

  <item name="android.hardware.camera2.CameraDevice android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int, java.util.Set<java.lang.String>) 0">

替换成：

  <item name="android.hardware.camera2.CameraDevice android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int, java.util.Set&lt;java.lang.String&gt;) 0">

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:26:16

表格转Markdown

把表格文字用正则处理成markdown表格，用于生成html后，拷贝出真正表格

从某网站 Android应用加固原理 - 简书，希望拷贝出 表格，但是只是拷贝出文字：

风险名称    风险    解决方案
1.App防止反编译    被反编译的暴露客户端逻辑，加密算法，密钥，等等    加固
2.java层代码源代码反编译风险    被反编译的暴露客户端逻辑，加密算法，密钥，等等    加固 ，混淆
3.so文件破解风险    导致核心代码泄漏。    so文件加固
4.篡改和二次打包风险    修改文件资源等，二次打包的添加病毒，广告，或者窃取支付密码，拦截短信等    资源文件混淆和校验签名的hash值
5.资源文件泄露风险    获取图片，js文件等文件，通过植入病毒，钓鱼页面获取用户敏感信息    资源混淆，加固等等
6.应用签名未交验风险    反编译或者二次打包，添加病毒代码，恶意代码，上传盗版App    对App进行签名证书校验
7.代码为混淆风险    业务逻辑暴露，加密算法，账号信息等等。    混淆（中文混淆）
8.webview明文存储密码风险    用户使用webview默认存储密码到databases/webview.db root的手机可以产看webview数据库，获取用户敏感信息    关闭wenview存储密码功能
9.明文数字证书风险    APK使用的数字证书用来校验服务器的合法性，保证数据的保密性和完成性 明文存储的证书被篡改造成数据被获取等    客户端校验服务器域名和数字证书等
10.调试日志函数调用风险    日志信息里面含有用户敏感信息等    关闭调试日志函数，删除打印的日志信息
11.AES/DES加密方法不安全使用风险    在使用AES/DES加密使用了ECB或者OFB工作模式，加密数据被选择明文攻击破解等    使用CBC和CFB工作模式等
12.RSA加密算法不安全风险    密数据被选择明文攻击破解和中间人攻击等导致用户敏感信息泄露    密码不要太短，使用正确的工作模式
13.密钥硬编码风险    用户使用加密算法的密钥设置成一个固定值导致密钥泄漏    动态生成加密密钥或者将密钥进程分段存储等
14.动态调试攻击风险    攻击者使用GDB，IDA调试追踪目标程序，获取用户敏感信息等    在so文件里面实现对调试进程的监听
15.应用数据任意备份风险    AndroidMainfest中allowBackup=true 攻击者可以使用adb命令对APP应用数据进行备份造成用户数据泄露    allowBackup=false
16.全局可读写内部文件风险。    实现不同软件之间数据共享，设置内部文件全局可读写造成其他应用也可以读取或者修改文件等    （1）.使用MODE_PRIVATE模式创建内部存储文件（2）.加密存储敏感数据3.避免在文件中存储明文和敏感信息
17.SharedPrefs全局可读写内部文件风险。    被其他应用读取或者修改文件等    使用正确的权限
18.Internal Storage数据全局可读写风险    当设置MODE_WORLD_READBLE或者设置android:sharedUserId导致敏感信息被其他应用程序读取等    设置正确的模式等
19.getDir数据全局可读写风险    当设置MODE_WORLD_READBLE或者设置android:sharedUserId导致敏感信息被其他应用程序读取等    设置正确的模式等
20.java层动态调试风险    AndroidManifest中调试的标记可以使用jdb进行调试，窃取用户敏感信息。    android：debuggable=“false”
21.内网测试信息残留风险    通过测试的Url，测试账号等对正式服务器进行攻击等    讲测试内网的日志清除，或者测试服务器和生产服务器不要使用同一个
22.随机数不安全使用风险    在使用SecureRandom类来生成随机数，其实并不是随机，导致使用的随机数和加密算法被破解。    （1）不使用setSeed方法（2）使用/dev/urandom或者/dev/random来初始化伪随机数生成器
23.Http传输数据风险    未加密的数据被第三方获取，造成数据泄露    使用Hpps
24.Htpps未校验服务器证书风险，Https未校验主机名风险，Https允许任意主机名风险    客户端没有对服务器进行身份完整性校验，造成中间人攻击    （1）.在X509TrustManager中的checkServerTrusted方法对服务器进行校验（2）.判断证书是否过期（3）.使用HostnameVerifier类检查证书中的主机名与使用证书的主机名是否一致
25.webview绕过证书校验风险    webview使用https协议加密的url没有校验服务器导致中间人攻击    校验服务器证书时候正确
26.界面劫持风险    用户输入密码的时候被一个假冒的页面遮挡获取用户信息等    （1）.使用第三方专业防界面劫持SDK（2）.校验当前是否是自己的页面
27.输入监听风险    用户输入的信息被监听或者按键位置被监听造成用户信息泄露等    自定义键盘
28.截屏攻击风险    对APP运行中的界面进行截图或者录制来获取用户信息    添加属性getWindow().setFlags(FLAG_SECURE)不让用户截图和录屏
29.动态注册Receiver风险    当动态注册Receiver默认生命周期是可以导出的可以被任意应用访问    使用带权限检验的registerReceiver API进行动态广播的注册
30.Content Provider数据泄露风险    权限设置不当导致用户信息    正确的使用权限
31.Service ，Activity，Broadcast,content provider组件导出风险    Activity被第三方应用访问导致被任意应用恶意调用    自定义权限
32.PendingIntent错误使用Intent风险    使用PendingIntent的时候，如果使用了一个空Intent，会导致恶意用户劫持修改Intent的内容    禁止使用一个空Intent去构造PendingIntent
33.Intent组件隐式调用风险    使用隐式Intent没有对接收端进行限制导致敏感信息被劫持    1.对接收端进行限制 2.建议使用显示调用方式发送Intent
34.Intent Scheme URL攻击风险    webview恶意调用App    对Intent做安全限制
35.Fragment注入攻击风险    出的PreferenceActivity的子类中，没有加入isValidFragment方法，进行fragment名的合法性校验，攻击者可能会绕过限制，访问未授权的界面    （1）.如果应用的Activity组件不必要导出，或者组件配置了intent filter标签，建议显示设置组件的“android:exported”属性为false（2）.重写isValidFragment方法，验证fragment来源的正确性
36.webview远程代码执行风险    风险：WebView.addJavascriptInterface方法注册可供JavaScript调用的Java对象，通过反射调用其他java类等    建议不使用addJavascriptInterface接口，对于Android API Level为17或者以上的Android系统，Google规定允许被调用的函数，必须在Java的远程方法上面声明一个@JavascriptInterface注解
37.zip文件解压目录遍历风险    Java代码在解压ZIP文件时，会使用到ZipEntry类的getName()方法，如果ZIP文件中包含“../”的字符串，该方法返回值里面原样返回，如果没有过滤掉getName()返回值中的“../”字符串，继续解压缩操作，就会在其他目录中创建解压的文件    （1）. 对重要的ZIP压缩包文件进行数字签名校验，校验通过才进行解压。 （2）. 检查Zip压缩包中使用ZipEntry.getName()获取的文件名中是否包含”../”或者”..”，检查”../”的时候不必进行URI Decode（以防通过URI编码”..%2F”来进行绕过），测试发现ZipEntry.getName()对于Zip包中有“..%2F”的文件路径不会进行处理。
38.Root设备运行风险    已经root的手机通过获取应用的敏感信息等    检测是否是root的手机禁止应用启动
39.模拟器运行风险    刷单，模拟虚拟位置等    禁止在虚拟器上运行
40.从sdcard加载Dex和so风险    未对Dex和So文件进行安全，完整性及校验，导致被替换，造成用户敏感信息泄露    （1）.放在APP的私有目录 （2）.对文件进行完成性校验。

然后希望处理成markdown

用正则替换：

(.+?)\t(.+?)\t(.+?)$
|$1|$2|$3|

后记：此处\t的Tab粘贴过来已变成空格=space了，所以改为：

(.+?)\s+(.+?)\s+(.+?)$
|$1|$2|$3|

效果：

从：

【此处由于印象笔记冲突导致帖子图片丢失】

变成：

【此处由于印象笔记冲突导致帖子图片丢失】

保存成 md文件，再去用VSCode中Markdown插件生成html或pdf

不过要加上一个表格的内容

| -----|----| -----|

打开效果：

【此处由于印象笔记冲突导致帖子图片丢失】

然后也方便，拷贝到别处，是个表格：

比如拷贝到印象笔记中：

【此处由于印象笔记冲突导致帖子图片丢失】

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:26:53

url中qs处理

把url中query parameter分出来

折腾：

【未解决】爬取mp.codeup.cn中的英语教材电子书资源

期间，对于：

http://mp.codeup.cn/book/sample2.htm?id=52365&shelfId=4824&share_=6765370&sh=sh&vt_=1583111113754&_logined=1

想要把参数分出来

用正则：

[&?](.+?)=([^&=]+)
\n$1 = $2

从：

【此处由于印象笔记冲突导致帖子图片丢失】

变成：

http://mp.codeup.cn/book/sample2.htm
id = 52365
shelfId = 4824
share_ = 6765370
sh = sh
vt_ = 1583111113754
_logined = 1

除了第一行，剩下的就是我们要的key=value形式了。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:27:18

print转logging

把print换成logging.debug

用：

print\("([^"]+)"(\s*%\s*\(?([^\)]+)\)?)?\)
logging.debug("$1", $3)

把：

print没有参数的：

print("taped 通讯录")

print单个参数的

print("++++++++++ taped element: %s" % curElement)

print多个参数的：

print("++++++++++ clicked element position: %s,%s" % (centerX, centerY))
print("Cost time %.2fs for save source %s" % (saveSourceTime, savedSourceFile))

都一次性变成logging.debug的写法：

      logging.debug("++++++++++ taped element: %s", curElement)

      logging.debug("++++++++++ clicked element position: %s,%s", centerX, centerY)

    logging.debug("Cost time %.2fs for save source %s", saveSourceTime, savedSourceFile)

    logging.debug("taped 通讯录", )

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:28:24

多余的lession单词

去除内容中多余的 lessionxxx的单词

正则：

lesson\s*\d+\n

从：

替换成：

语句末尾去掉感叹号

正则：

!\n
\n

从：

替换成：

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:28:57

标题链接转Markdown

文章标题和链接转换为Markdown的链接

正则替换规则：

(.+)\n(http.+)\n
* [$1]($2)\n

从：

android - decompiling DEX into Java sourcecode - Stack Overflow
https://stackoverflow.com/questions/1249973/decompiling-dex-into-java-sourcecode/55486175#55486175
decompiler - how to use DEXtoJar - Stack Overflow
https://stackoverflow.com/questions/5257830/how-to-use-dextojar/55486507#55486507
android - Is there a way to get the source code from an APK file? - Stack Overflow
https://stackoverflow.com/questions/3593420/is-there-a-way-to-get-the-source-code-from-an-apk-file/55567538#55567538
Android反编译简单实战 - 知乎
https://zhuanlan.zhihu.com/p/51260384
Android应用加固产品使用对比 - 『移动安全区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|破解软件|www.52pojie.cn
https://www.52pojie.cn/thread-832804-1-1.html
Android混淆（ProGuard）从0到1 - 简书
https://www.jianshu.com/p/1b76e4c10495
乐固加固脱壳实战 - faTe's Home
http://www.holdheart.com/archives/33.html
乐固壳分析 - bamb00 - 博客园
http://www.cnblogs.com/goodhacker/p/8666217.html
Android APK 反编译实践 - 简书
https://www.jianshu.com/p/9e0d1c3e342e
5分钟学会基于Xposed+DumpDex的apk快速脱壳方法 - 简书
https://www.jianshu.com/p/9d988bdddb3d
腾讯加固纯手工简易脱壳教程 - 『移动安全区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|破解软件|www.52pojie.cn
https://www.52pojie.cn/thread-428271-1-1.html
ANDROID 逆向实例（八）－ 乐固加固脱壳（2017.01） ~ and-rev
https://and-rev.blogspot.com/2017/05/android-201701.html
花生日记APP邀请注册机实战（360加固脱壳） – Silkage's Blog
https://blog.silkage.net/software/peanutdiary.html
如何反编译Android 的apk/dex/odex，获得源码 – 码农日记
https://www.androiddev.net/反编译android-的apk/
HangZhouCat/ReaverAPKTools: 逆向APK工具
https://github.com/HangZhouCat/ReaverAPKTools
Android逆向之路---脱壳360加固 - 简书
https://www.jianshu.com/p/d24c6694fe97
26款优秀的Android逆向工程工具 - 简书
https://www.jianshu.com/p/ef0b6f75c229
Application Hardening - Mobile App Hardening | Promon
https://promon.co/security-news/application-hardening/
Cydia Substrate使用手册 - 简书
https://www.jianshu.com/p/ba795ff3471a

把：

换成：

* [android - decompiling DEX into Java sourcecode - Stack Overflow](https://stackoverflow.com/questions/1249973/decompiling-dex-into-java-sourcecode/55486175#55486175)
* [decompiler - how to use DEXtoJar - Stack Overflow](https://stackoverflow.com/questions/5257830/how-to-use-dextojar/55486507#55486507)
* [android - Is there a way to get the source code from an APK file? - Stack Overflow](https://stackoverflow.com/questions/3593420/is-there-a-way-to-get-the-source-code-from-an-apk-file/55567538#55567538)
* [Android反编译简单实战 - 知乎](https://zhuanlan.zhihu.com/p/51260384)
* [Android应用加固产品使用对比 - 『移动安全区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|破解软件|www.52pojie.cn](https://www.52pojie.cn/thread-832804-1-1.html)
* [Android混淆（ProGuard）从0到1 - 简书](https://www.jianshu.com/p/1b76e4c10495)
* [乐固加固脱壳实战 - faTe's Home](http://www.holdheart.com/archives/33.html)
* [乐固壳分析 - bamb00 - 博客园](http://www.cnblogs.com/goodhacker/p/8666217.html)
* [Android APK 反编译实践 - 简书](https://www.jianshu.com/p/9e0d1c3e342e)
* [5分钟学会基于Xposed+DumpDex的apk快速脱壳方法 - 简书](https://www.jianshu.com/p/9d988bdddb3d)
* [腾讯加固纯手工简易脱壳教程 - 『移动安全区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|破解软件|www.52pojie.cn](https://www.52pojie.cn/thread-428271-1-1.html)
* [ANDROID 逆向实例（八）－ 乐固加固脱壳（2017.01） ~ and-rev](https://and-rev.blogspot.com/2017/05/android-201701.html)
* [花生日记APP邀请注册机实战（360加固脱壳） – Silkage's Blog](https://blog.silkage.net/software/peanutdiary.html)
* [如何反编译Android 的apk/dex/odex，获得源码 – 码农日记](https://www.androiddev.net/反编译android-的apk/)
* [HangZhouCat/ReaverAPKTools: 逆向APK工具](https://github.com/HangZhouCat/ReaverAPKTools)
* [Android逆向之路---脱壳360加固 - 简书](https://www.jianshu.com/p/d24c6694fe97)
* [26款优秀的Android逆向工程工具 - 简书](https://www.jianshu.com/p/ef0b6f75c229)
* [Application Hardening - Mobile App Hardening | Promon](https://promon.co/security-news/application-hardening/)
* [Cydia Substrate使用手册 - 简书](https://www.jianshu.com/p/ba795ff3471a)

用于：放在markdown作为参考资料。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:29:27

json字符串变列表

json后缀的字符串变成代码中字符串列表

正则：

(\w+)\n
  "$1",\n

从：

booklistsJson
rbrsJson
latestCommentJson
myCommentJson
whoHasThisBookJson
topicArrayJson
bookFeaturesArrayJson
bookFeaturesWithContentArrayJson
worksCollectionArrayJson
readingAgeDistributionArrayJson
topReadingAgeDistributionArrayJson
scoreDistributionArrayJson
likeThisBookKidsAlsoLikeBookArrayJson
childDataArrayJson
inPagePictureArrayJson
xunxiArrayJson
experienceArrayJson
answerArrayJson
englishLevelArrayJson

变成：

  "booklistsJson",
  "rbrsJson",
  "latestCommentJson",
  "myCommentJson",
  "whoHasThisBookJson",
  "topicArrayJson",
  "bookFeaturesArrayJson",
  "bookFeaturesWithContentArrayJson",
  "worksCollectionArrayJson",
  "readingAgeDistributionArrayJson",
  "topReadingAgeDistributionArrayJson",
  "scoreDistributionArrayJson",
  "likeThisBookKidsAlsoLikeBookArrayJson",
  "childDataArrayJson",
  "inPagePictureArrayJson",
  "xunxiArrayJson",
  "experienceArrayJson",
  "answerArrayJson",
  "englishLevelArrayJson",

用于：

拷贝到代码里，用于列表变量的值：

省去：自己手动去对每一行手动去加上""再控制缩进的繁琐工作了。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:29:55

提取历史版本

获取到康美通的版本历史

正则：

(\.\d+)\n
$1

从：

相关历史版本

23.34MB最新版
康美通 4.3.0
23.34MB 安全下载
康美通 4.2.3
19.47MB 安全下载
康美通 4.2.2
19.29MB 安全下载
康美通 4.2.1
19.29MB 安全下载
康美通 4.2.0
19.18MB 安全下载
康美通 4.1.1
19.47MB 安全下载
康美通 4.1.0
19.48MB 安全下载
康美通 4.0
14.37MB 安全下载
康美通 3.2
14.22MB 安全下载
康美通 3.1
23.2MB 安全下载
康美通 3.0
23.1MB 安全下载
康美通 2.0.9
7.93MB 安全下载
康美通 2.0.8
7.3MB 安全下载
康美通 2.0.7
7.29MB 安全下载
康美通 2.0.6
7.29MB 安全下载
康美通 1.0.1
6.27MB 安全下载
康美通 1.0beta
5.86MB 安全下载
 下载豌豆荚客户端 (更多历史版本)下载
康美通 历史版本年份合集

替换成：

相关历史版本

23.34MB最新版
康美通 4.3.0 23.34MB 安全下载
康美通 4.2.3 19.47MB 安全下载
康美通 4.2.2 19.29MB 安全下载
康美通 4.2.1 19.29MB 安全下载
康美通 4.2.0 19.18MB 安全下载
康美通 4.1.1 19.47MB 安全下载
康美通 4.1.0 19.48MB 安全下载
康美通 4.0 14.37MB 安全下载
康美通 3.2 14.22MB 安全下载
康美通 3.1 23.2MB 安全下载
康美通 3.0 23.1MB 安全下载
康美通 2.0.9 7.93MB 安全下载
康美通 2.0.8 7.3MB 安全下载
康美通 2.0.7 7.29MB 安全下载
康美通 2.0.6 7.29MB 安全下载
康美通 1.0.1 6.27MB 安全下载
康美通 1.0beta
5.86MB 安全下载
 下载豌豆荚客户端 (更多历史版本)下载
康美通 历史版本年份合集

再去用正则：

 安全下载

替换，得到我们要的：

相关历史版本：
康美通 4.3.1 23.34MB
康美通 4.3.0 23.34MB
康美通 4.2.3 19.47MB
康美通 4.2.2 19.29MB
康美通 4.2.1 19.29MB
康美通 4.2.0 19.18MB
康美通 4.1.1 19.47MB
康美通 4.1.0 19.48MB
康美通 4.0 14.37MB
康美通 3.2 14.22MB
康美通 3.1 23.2MB
康美通 3.0 23.1MB
康美通 2.0.9 7.93MB
康美通 2.0.8 7.3MB
康美通 2.0.7 7.29MB
康美通 2.0.6 7.29MB
康美通 1.0.1 6.27MB
康美通 1.0beta 5.86MB

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:30:22

srt字幕字体大小

去掉srt字幕中font size

正则：

<font size="36">([^<>/]+)</font>
$1

从：

替换成：

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:30:54

cvs中等号

去除掉csv中多余的="xxx"

客户给的一个数据文件csv格式的，但是内部内容中发现有多余的 ="xxx"，应该改为xxx才对。

所以用VSCode去替换，用正则：

="(.+?)”
$1

实现了，把 ="7xxx1"：

替换成 7xxx1：

即可。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:31:20

文章段落加换行

给文章段落增加换行

用正则：

\n(\d.)
\n\n$1

把：

...互。
1.字节跳动
...说过。
2.陆奇给年轻人的话
...
8.网易 丁磊
...

变成：

...互。
1.字节跳动
...说过。

2.陆奇给年轻人的话
...

8.网易 丁磊
...

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:31:44

url中qs参数变字典

把url中查询参数换成代码中字典参数

用正则：

dt=([^&]+)&?
"dt": "$1",\n

把：

dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t

替换成：

"dt": "at",
"dt": "bd",
"dt": "ex",
"dt": "ld",
"dt": "md",
"dt": "qca",
"dt": "rw",
"dt": "rm",
"dt": "ss",
"dt": "t",

用于后续放到代码中使用：

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:32:16

单词加引号

把每个词都加上引号，用于放代码中用

用正则：

(.+)
    "$1",

从输入：

更新公告
签到奖励
离线经验
在线奖励
等级礼包
资源找回
活动时间
活动内容
累计充值

变成：

    "更新公告",
    "签到奖励",
    "离线经验",
    "在线奖励",
    "等级礼包",
    "资源找回",
    "活动时间",
    "活动内容",
    "累计充值",

用于拷贝到代码中使用：

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:32:40

去除多余换行

去除每行秒及毫秒的多余换行

正则：

\n((\d+ s )?\d+ ms)
$1

从：

completed successfully
3 s 149 ms
Run build
3 s 80 ms
Load build
2 ms
Evaluate settings
1 ms
Finalize build cache configuration

Configure build
420 ms
Load projects
6 ms
Calculate task graph
120 ms
Run tasks
2 s 532 ms
:api:preBuild
21 ms
:api:preDebugBuild
3 ms
:api:compileDebugAidl
1 s 95 ms
Execute taskAction
869 ms
:cts_provider:preBuild

。。。

变成：

completed successfully 3 s 149 ms
Run build 3 s 80 ms
Load build 2 ms
Evaluate settings 1 ms
Finalize build cache configuration

Configure build 420 ms
Load projects 6 ms
Calculate task graph 120 ms
Run tasks 2 s 532 ms
:api:preBuild 21 ms
:api:preDebugBuild 3 ms
:api:compileDebugAidl 1 s 95 ms
Execute taskAction 869 ms
:cts_provider:preBuild
。。。

即可实现：

去掉了每行多余的换行

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:33:12

EF下标加粗

Markdown中让EF后缀变下标且加粗

正则：

`EF([^`]+)`
EF<b><sub>$1</sub></b>

从：

    * EF<b><sub>IMPI</sub></b> – IMS private user identity,
    * EF<b><sub>DOMAIN</sub></b> - Home Network Domain Name,
    * `EFIMPU` - IMS Public User Identity (one or more),
    * `EFAD` - Administrative Data (UE operation mode, e.g. normal or type approval),
    * `EFARR` - Access Rule Reference (access rules for files located under the ISIM ADF),
    * `EFIST` - ISIM Service Table (lists available optional services:P-CSCF address, Generic Bootstrapping Architecture (GBA), HTTP Digest, GBA-based Local Key Establishment Mechanism, support of P-CSCF discovery for IMS local break out),
    * `EFP-CSCF` - P-CSCF Address (one or more),
    * `EFGBABP` - GBA Bootstrapping parameters (contains the AKA Random challenge (RAND) and Bootstrapping Transaction Identifier (B-TID) associate with a GBA bootstrapping procedure),
    * `EFGBANL` - GBA NAF List (contains the list of NAF_ID and B-TID associated to a GBA NAF derivation procedure)
    * `EFNAFKCA` - NAF Key Centre Address (one or more).

变成：

    * EF<b><sub>IMPI</sub></b> – IMS private user identity,
    * EF<b><sub>DOMAIN</sub></b> - Home Network Domain Name,
    * EF<b><sub>IMPU</sub></b> - IMS Public User Identity (one or more),
    * EF<b><sub>AD</sub></b> - Administrative Data (UE operation mode, e.g. normal or type approval),
    * EF<b><sub>ARR</sub></b> - Access Rule Reference (access rules for files located under the ISIM ADF),
    * EF<b><sub>IST</sub></b> - ISIM Service Table (lists available optional services:P-CSCF address, Generic Bootstrapping Architecture (GBA), HTTP Digest, GBA-based Local Key Establishment Mechanism, support of P-CSCF discovery for IMS local break out),
    * EF<b><sub>P-CSCF</sub></b> - P-CSCF Address (one or more),
    * EF<b><sub>GBABP</sub></b> - GBA Bootstrapping parameters (contains the AKA Random challenge (RAND) and Bootstrapping Transaction Identifier (B-TID) associate with a GBA bootstrapping procedure),
    * EF<b><sub>GBANL</sub></b> - GBA NAF List (contains the list of NAF_ID and B-TID associated to a GBA NAF derivation procedure)
    * EF<b><sub>NAFKCA</sub></b> - NAF Key Centre Address (one or more).

Markdown的预览效果：

【此处由于印象笔记冲突导致帖子图片丢失】

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:33:56

只保留文件名

去掉其他只保留文件名

正则：

\[.+?\]\t(.+.((jpg)|(png)|(gif)|(pdf))).+\n*
$1\n

从：

[IMG]    主流测试工具分类.jpg    2018-09-21 20:59    159K
[IMG]    内网渗透.png    2020-02-03 01:25    265K
[IMG]    域名搜集途径.png    2018-09-21 20:59    139K
[IMG]    安全漏洞总结.jpg    2018-09-21 20:59    368K
[IMG]    密码找回逻辑漏洞总结.png    2018-12-18 05:09    141K
[IMG]    渗透标准.jpg    2020-02-03 01:25    189K
[IMG]    渗透流程.jpg    2018-09-21 20:59    56K
[IMG]    渗透测试实验室.jpg    2020-02-03 01:25    888K
[IMG]    渗透测试思维导图.png    2020-02-03 01:25    3.7M
[IMG]    渗透测试流程.jpg    2018-09-21 20:59    221K
[IMG]    渗透测试详细版.jpg    2018-09-21 20:59    260K
[IMG]    社会工程学.jpg    2018-09-21 20:59    95K
[IMG]    系统端口审计琐事.jpg    2018-09-21 20:59    57K
[IMG]    网站入侵图.jpg    2018-09-21 20:59    92K
[IMG]    网络安全绪论.png    2018-09-21 20:59    678K
[IMG]    进阶渗透.png    2018-09-21 20:59    103K
[IMG]    黑客入侵行为分析.gif    2018-09-21 20:59    18K
[IMG]    JavaWeb简介.png    2018-09-21 20:59    913K
[IMG]    Jboss引起的内网渗透.png    2018-09-21 20:59    229K
[IMG]    Maltego使用导图.jpg    2018-09-21 20:59    539K
[IMG]    Nmap.png    2018-09-21 20:59    1.1M
[IMG]    PHP源码审计.png    2018-09-21 20:59    4.0M
[   ]    PTES_MindMap_CN1.pdf    2018-09-21 20:59    417K
[IMG]    Python系统审计.jpg    2018-09-21 20:59    343K
[IMG]    RedTeamManula.jpg    2020-02-03 01:25    5.8M
[IMG]    WEB2HACK.jpg    2020-02-03 01:25    137K
[IMG]    Web安全技术点.jpg    2018-09-21 20:59    193K
[IMG]    Web安全.png    2018-09-21 20:59    228K
[IMG]    Web指纹分析方法.png    2018-09-21 20:59    55K
[IMG]    Web攻击及防御技术.png    2018-09-21 20:59    855K
[IMG]    Web服务器入侵防御.jpg    2018-09-21 20:59    88K
[IMG]    Web 架构中的安全问题.png    2018-09-21 20:59    728K
[IMG]    Windows常见持久控制.png    2020-02-03 01:25    185K
[IMG]    XSS利用架构图.jpg    2020-02-03 01:25    100K
[IMG]    XSS攻击点汇总.png    2018-09-21 20:59    2.2M
[IMG]    nmap.jpg    2018-09-21 20:59    295K
[IMG]    pentest_method.jpg    2018-09-21 20:59    177K
[IMG]    pentester.jpg    2018-09-21 20:59    3.6M
[IMG]    powershell语法.png    2018-09-21 20:59    323K
[IMG]    web应用测试.jpg    2020-02-03 01:25    607K
[IMG]    web渗透.jpg    2018-09-21 20:59    225K
[IMG]    xml安全汇总.png    2018-09-21 20:59    1.7M

替换为：

主流测试工具分类.jpg
内网渗透.png
域名搜集途径.png
安全漏洞总结.jpg
密码找回逻辑漏洞总结.png
渗透标准.jpg
渗透流程.jpg
渗透测试实验室.jpg
渗透测试思维导图.png
渗透测试流程.jpg
渗透测试详细版.jpg
社会工程学.jpg
系统端口审计琐事.jpg
网站入侵图.jpg
网络安全绪论.png
进阶渗透.png
黑客入侵行为分析.gif
JavaWeb简介.png
Jboss引起的内网渗透.png
Maltego使用导图.jpg
Nmap.png
PHP源码审计.png
PTES_MindMap_CN1.pdf
Python系统审计.jpg
RedTeamManula.jpg
WEB2HACK.jpg
Web安全技术点.jpg
Web安全.png
Web指纹分析方法.png
Web攻击及防御技术.png
Web服务器入侵防御.jpg
Web 架构中的安全问题.png
Windows常见持久控制.png
XSS利用架构图.jpg
XSS攻击点汇总.png
nmap.jpg
pentest_method.jpg
pentester.jpg
powershell语法.png
web应用测试.jpg
web渗透.jpg
xml安全汇总.png

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:34:25

get函数被调用的地方

搜索get函数被调用的地方

默认如果搜

get(

则会搜出来很多，有很多个 我们不希望看到的

http.get(

想要排斥掉http.get(

想到了用正则

参考之前语法：

(?<!xxx): negative look behind (assertion)=反向否定断言

去用：

(?<!http\.)get\(

然后只有7个，都是我们要找到了：

【此处由于印象笔记冲突导致帖子图片丢失】

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:34:48

15秒相关的地方

想要搜索15秒相关的内容

直接搜15，找到很多xxx="15"不是我们要的：

【此处由于印象笔记冲突导致帖子图片丢失】

所以想要排除掉：

前面是双引号

后面也是双引号的

所以用：

(?<!")15(?!")

即可过滤掉，找到其他地方的15：

【此处由于印象笔记冲突导致帖子图片丢失】

即，支持用

look ahead negative

look behind negative

去过滤掉不要的情况。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:35:15

地址变url

把链接标题和地址变成Markdown中url格式

用：

^([^/]+)\n(https?://.+)
* [$1]($2)

把：

PyCharm Community Edition and Professional Edition Explained: Licenses and More | PyCharm Blog
https://blog.jetbrains.com/pycharm/2017/09/pycharm-community-edition-and-professional-edition-explained-licenses-and-more/
Differences between Pycharm community and professional edition?：Python
https://www.reddit.com/r/Python/comments/7370yp/differences_between_pycharm_community_and/
Pycharm的教育版和社区版有什么区别？ - 知乎
https://www.zhihu.com/question/47511825
使用PyCharm进行Python远程调试
http://leoc.leanote.com/post/remote-debugging-with-pycharm
Pycharm的远程代码编辑 - kiwik's blog
http://kiwik.github.io/python/2013/08/12/Pycharm的远程代码编辑/

变成markdown中url的格式：

* [PyCharm Community Edition and Professional Edition Explained: Licenses and More | PyCharm Blog](https://blog.jetbrains.com/pycharm/2017/09/pycharm-community-edition-and-professional-edition-explained-licenses-and-more/)
* [Differences between Pycharm community and professional edition?：Python](https://www.reddit.com/r/Python/comments/7370yp/differences_between_pycharm_community_and/)
* [Pycharm的教育版和社区版有什么区别？ - 知乎](https://www.zhihu.com/question/47511825)
* [使用PyCharm进行Python远程调试](http://leoc.leanote.com/post/remote-debugging-with-pycharm)
* [Pycharm的远程代码编辑 - kiwik's blog](http://kiwik.github.io/python/2013/08/12/Pycharm的远程代码编辑/)

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:35:52

单行变多行

单行变多行加换行

想要从 服务中心_查询保险条款题-条款内容页 复制出的文字：

【碰撞】指被保险机动车或其符合装载规定的货物与外界固态物体之间发生的、产生撞击痕迹的意外撞击。 【倾覆】指被保险机动车由于自然灾害或意外事故，造成本被保险机动车翻倒，车体触地，失去正常状态和行驶能力，不经施救不能恢复行驶。 【坠落】 指被保险机动车在行驶中发生意外事故，整车腾空后下落，造成本车损失的情况。非整车腾空，仅由于颠簸造成被保险机动车损失的，不属于坠落。 【外界物体倒塌】指被保险机动车自身以外的物体倒下或陷下。 【自燃】指在没有外界火源的情况下，由于本车电器、线路、供油系统、供气系统等被保险机动车自身原因或所载货物自身原因起火燃烧。 【火灾】指被保险机动车本身以外的火源引起的、在时间或空间上失去控制的燃烧（即有热、有光、有火焰的剧烈的氧化反应）所造成的灾害。 【次生灾害】指地震造成工程结构、设施和自然环境破坏而引发的火灾、爆炸、瘟疫、有毒有害物质污染、海啸、水灾、泥石流、滑坡等灾害。 【暴风】指风速在28.5米/秒（相当于11级大风）以上的大风。风速以气象部门公布的数据为准。 【暴雨】指每小时降雨量达16毫米以上，或连续12小时降雨量达30毫米以上，或连续24小时降雨量达50毫米以上。 【洪水】指山洪暴发、江河泛滥、潮水上岸及倒灌。但规律性的涨潮、自动灭火设施漏水以及在常年水位以下或地下渗水、水管爆裂不属于洪水责任。 【玻璃单独破碎】指未发生被保险机动车其他部位的损坏，仅发生被保险机动车前后风挡玻璃和左右车窗玻璃的损坏。 【车轮单独损坏】指未发生被保险机动车其他部位的损坏，仅发生轮胎、轮辋、轮毂罩的分别单独损坏，或上述三者之中任意二者的共同损坏，或三者的共同损坏。 【车身划痕损失】仅发生被保险机动车车身表面油漆的损坏，且无明显碰撞痕迹。 【新增设备】指被保险机动车出厂时原有设备以外的，另外加装的设备和设施。 【新车购置价】指本保险合同签订地购置与被保险机动车同类型新车的价格，无同类型新车市场销售价格的，由投保人与保险人协商确定。 【单方肇事事故】指不涉及与第三者有关的损害赔偿的事故，但不包括自然灾害引起的事故。 【家庭成员】指配偶、子女、父母。 【市场公允价值】 指熟悉市场情况的买卖双方在公平交易的条件下和自愿的情况下所确定的价格，或无关联的双方在公平交易的条件下一项资产可以被买卖或者一项负债可以被清偿的成交价格。

变成易读的，多行。

正则：

(【[^【】]+】)
\n$1

把：

【此处由于印象笔记冲突导致帖子图片丢失】

变成：

【碰撞】指被保险机动车或其符合装载规定的货物与外界固态物体之间发生的、产生撞击痕迹的意外撞击。
【倾覆】指被保险机动车由于自然灾害或意外事故，造成本被保险机动车翻倒，车体触地，失去正常状态和行驶能力，不经施救不能恢复行驶。
【坠落】 指被保险机动车在行驶中发生意外事故，整车腾空后下落，造成本车损失的情况。非整车腾空，仅由于颠簸造成被保险机动车损失的，不属于坠落。
【外界物体倒塌】指被保险机动车自身以外的物体倒下或陷下。
【自燃】指在没有外界火源的情况下，由于本车电器、线路、供油系统、供气系统等被保险机动车自身原因或所载货物自身原因起火燃烧。
【火灾】指被保险机动车本身以外的火源引起的、在时间或空间上失去控制的燃烧（即有热、有光、有火焰的剧烈的氧化反应）所造成的灾害。
【次生灾害】指地震造成工程结构、设施和自然环境破坏而引发的火灾、爆炸、瘟疫、有毒有害物质污染、海啸、水灾、泥石流、滑坡等灾害。
【暴风】指风速在28.5米/秒（相当于11级大风）以上的大风。风速以气象部门公布的数据为准。
【暴雨】指每小时降雨量达16毫米以上，或连续12小时降雨量达30毫米以上，或连续24小时降雨量达50毫米以上。
【洪水】指山洪暴发、江河泛滥、潮水上岸及倒灌。但规律性的涨潮、自动灭火设施漏水以及在常年水位以下或地下渗水、水管爆裂不属于洪水责任。
【玻璃单独破碎】指未发生被保险机动车其他部位的损坏，仅发生被保险机动车前后风挡玻璃和左右车窗玻璃的损坏。
【车轮单独损坏】指未发生被保险机动车其他部位的损坏，仅发生轮胎、轮辋、轮毂罩的分别单独损坏，或上述三者之中任意二者的共同损坏，或三者的共同损坏。
【车身划痕损失】仅发生被保险机动车车身表面油漆的损坏，且无明显碰撞痕迹。
【新增设备】指被保险机动车出厂时原有设备以外的，另外加装的设备和设施。
【新车购置价】指本保险合同签订地购置与被保险机动车同类型新车的价格，无同类型新车市场销售价格的，由投保人与保险人协商确定。
【单方肇事事故】指不涉及与第三者有关的损害赔偿的事故，但不包括自然灾害引起的事故。
【家庭成员】指配偶、子女、父母。
【市场公允价值】 指熟悉市场情况的买卖双方在公平交易的条件下和自愿的情况下所确定的价格，或无关联的双方在公平交易的条件下一项资产可以被买卖或者一项负债可以被清偿的成交价格。

方便拷贝到别处使用和阅读了。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:36:19

标题转Markdown

给帖子标题加上Markdown的链接的格式

正则语法：

^[\-\*^] ([^【]+)$

* [$1]()

替换前：

- 【整理】AAVE借贷逻辑：deposit=存款
- aave-protocol/docs/Aave_Protocol_Whitepaper_v1_0.pdf at master · aave/aave-protocol (github.com)
- Aave调研报告 - s3cunda's blog
- Dapp-Learning/defi/Aave/contract/9-LendingPool.md at main · Dapp-Learning-DAO/Dapp-Learning (github.com)

替换后：

- 【整理】AAVE借贷逻辑：deposit=存款
* [aave-protocol/docs/Aave_Protocol_Whitepaper_v1_0.pdf at master · aave/aave-protocol (github.com)]()
* [Aave调研报告 - s3cunda's blog]()
* [Dapp-Learning/defi/Aave/contract/9-LendingPool.md at main · Dapp-Learning-DAO/Dapp-Learning (github.com)]()

注：后续再填上url地址，即可成Markdown中的真正的链接了。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:40:55

Cycript中保留类名

Cycript输出的类的详细信息去掉细节只保留类名

正则：

<(\w+) 0x\w+>,.+

$1

替换前：

cy# pvcs()
`<YTAppViewController 0x10e92f400>, state: appeared, view: <YTAppView 0x10e3d2000>
   | <YTScrollableNavigationController 0x10e968000>, state: disappeared, view: <UILayoutContainerView 0x10e3d33e0>
   |    | <YTHeaderContentComboViewController 0x11312ce30>, state: disappeared, view: <YTHeaderContentComboView 0x10e3cf180> not in the window
   |    |    | <YTBrowseViewController 0x11dc04860>, state: disappeared, view: <YTWrapperView 0x10e305080> not in the window
   |    |    |    | <YTBrowseResponseViewController 0x10e901200>, state: disappeared, view: <YTVariableHeightHeaderView 0x10e6bd020> not in the window
   |    |    |    |    | <YTTabsViewController 0x113156170>, state: disappeared, view: <YTTabsView 0x11315e3d0> not in the window
   |    |    |    |    |    | <YTPageViewController 0x1131784c0>, state: disappeared, view: <YTPageView 0x10f251a00> not in the window
   |    |    |    |    |    |    | <YTTabViewController 0x10e9a7a00>, state: disappeared, view: <YTVariableHeightHeaderView 0x10e3c6240> not in the window
   |    |    |    |    |    |    |    | <YTSectionListViewController 0x1131582d0>, state: disappeared, view: <UIView 0x113182c20> not in the window
   |    |    |    |    |    |    |    |    | <YTVariableHeightHeaderViewController 0x11315d080>, state: disappeared, view: <YTVariableHeightHeaderView 0x1131586a0> not in the window
   |    |    |    |    |    |    |    |    |    | <YTAppCollectionViewController 0x10f2fb600>, state: disappeared, view: <YTAsyncCollectionView 0x10f307000> not in the window
   |    |    | <YTHeaderViewController 0x10f2a1000>, state: disappeared, view: <YTHeaderView 0x11312e640> not in the window
   |    | <YTHeaderContentComboViewController 0x121426630>, state: disappeared, view: <YTHeaderContentComboView 0x12142c0a0>
   |    |    | <YTSearchResultsViewController 0x10f570800>, state: disappeared, view: <YTWrapperView 0x12142ab90>
   |    |    |    | <YTSearchResponseViewController 0x12142ad20>, state: disappeared, view: <YTWrapperView 0x12141c7d0>
   |    |    |    |    | <YTSectionListViewController 0x11fc6e560>, state: disappeared, view: <UIView 0x12143a6d0>
   |    |    |    |    |    | <YTVariableHeightHeaderViewController 0x11fc69b20>, state: disappeared, view: <YTVariableHeightHeaderView 0x1131e5950>
   |    |    |    |    |    |    | <YTAppCollectionViewController 0x10e9bf600>, state: disappeared, view: <YTAsyncCollectionView 0x10ecc3e00>
   |    |    | <YTHeaderViewController 0x10eca4e00>, state: disappeared, view: <YTHeaderView 0x121407b80>
   | <YTPivotBarViewController 0x10e6e78a0>, state: appeared, view: <YTPivotBarView 0x10e6edb70>
   | <YTWatchLayerViewController 0x10f23a800>, state: appeared, view: <YTWatchLayerView 0x10e3d6970>
   |    | <YTWatchMiniBarViewController 0x10e941a00>, state: appeared, view: <YTWatchMiniBarView 0x10e3d7390>
   |    | <YTWatchViewController 0x10ee83a00>, state: appeared, view: <YTWatchSingleItemView 0x12557ff70>
   |    |    | <YTEngagementPanelMultipleStacksContainerViewController 0x12554c100>, state: appeared, view: <YTEngagementPanelMultipleStacksContainerView 0x12559a850>
   |    |    | <YTPlayerViewController 0x10f635200>, state: appeared, view: <YTPlayerView 0x12554ce90>
   |    |    |    | <YTMainAppVideoPlayerOverlayViewController 0x10f349800>, state: appeared, view: <YTMainAppVideoPlayerOverlayView 0x12554fea0>
   |    |    |    |    | <YTOverflowMenuViewController 0x125573460>, state: appeared, view: <YTOverflowMenuView 0x11317dd20>
   |    |    |    |    | <YTVRCaptionOverlayViewController 0x127573360>, state: appeared, view: <YTVRCaptionOverlayView 0x113139d90>
   |    |    |    |    | <YTCreatorEndscreenViewController 0x1271c9e10>, state: disappeared, view: (view not loaded)
   |    |    |    |    | <YTInfoCardDrawerViewController 0x1271d03a0>, state: disappeared, view: (view not loaded)
   |    |    |    |    | <YTInfoCardTeaserViewController 0x12758c6b0>, state: appeared, view: <YTInfoCardDarkTeaserContainerView 0x1271d1310>
   |    |    | <YTWatchNextViewController 0x125738b30>, state: appeared, view: <YTWrapperView 0x1257390e0>
   |    |    |    | <YTWatchNextResponseViewController 0x125739270>, state: appeared, view: <YTWatchNextView 0x125739b80>
   |    |    |    |    | <YTWatchNextResultsViewController 0x10efbc800>, state: appeared, view: <YTAsyncCollectionView 0x10efa7000>
   |    |    |    |    | <YTInfoCardDrawerViewController 0x113148f50>, state: appeared, view: <YTInfoCardDrawerView 0x11dc3a060>
   | <MDXViewController 0x11311d990>, state: appeared, view: <MDXView 0x113117780>`

替换后：

cy# pvcs()
`YTAppViewController
   | YTScrollableNavigationController
   |    | YTHeaderContentComboViewController
   |    |    | YTBrowseViewController
   |    |    |    | YTBrowseResponseViewController
   |    |    |    |    | YTTabsViewController
   |    |    |    |    |    | YTPageViewController
   |    |    |    |    |    |    | YTTabViewController
   |    |    |    |    |    |    |    | YTSectionListViewController
   |    |    |    |    |    |    |    |    | YTVariableHeightHeaderViewController
   |    |    |    |    |    |    |    |    |    | YTAppCollectionViewController
   |    |    | YTHeaderViewController
   |    | YTHeaderContentComboViewController
   |    |    | YTSearchResultsViewController
   |    |    |    | YTSearchResponseViewController
   |    |    |    |    | YTSectionListViewController
   |    |    |    |    |    | YTVariableHeightHeaderViewController
   |    |    |    |    |    |    | YTAppCollectionViewController
   |    |    | YTHeaderViewController
   | YTPivotBarViewController
   | YTWatchLayerViewController
   |    | YTWatchMiniBarViewController
   |    | YTWatchViewController
   |    |    | YTEngagementPanelMultipleStacksContainerViewController
   |    |    | YTPlayerViewController
   |    |    |    | YTMainAppVideoPlayerOverlayViewController
   |    |    |    |    | YTOverflowMenuViewController
   |    |    |    |    | YTVRCaptionOverlayViewController
   |    |    |    |    | YTCreatorEndscreenViewController
   |    |    |    |    | YTInfoCardDrawerViewController
   |    |    |    |    | YTInfoCardTeaserViewController
   |    |    | YTWatchNextViewController
   |    |    |    | YTWatchNextResponseViewController
   |    |    |    |    | YTWatchNextResultsViewController
   |    |    |    |    | YTInfoCardDrawerViewController
   | MDXViewController

-》即可得到很清晰的，UI页面的类的层级关系，且只关心类名

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:42:53

os_log转dylibLog

把os_log换成自己定义的宏dylibLog

正则：

if \(isShowDetailLog\) \{\n\s+os_log\(OS_LOG_DEFAULT, "hook_dyld \w+: (.+)\n\s+\}

dyldLog("$1

替换前：

    if (isShowDetailLog) {
        os_log(OS_LOG_DEFAULT, "hook_dyld getJbDylibImgIdxList: *jbDylibIdxListLen=%d", *jbDylibIdxListLen);
    }

    if (isShowDetailLog) {
        os_log(OS_LOG_DEFAULT, "hook_dyld getJbDylibImgIdxList: list end, jbDylibIdxList[%d]=%d", curListEndIdx, jbDylibIdxList[curListEndIdx]);
    }

    if (isShowDetailLog) {
        os_log(OS_LOG_DEFAULT, "hook_dyld getJbDylibImgIdxList: now return outJbDylibIdxList=%p, *outJbDylibIdxList=%p, jbDylibIdxList=%p, *jbDylibIdxListLen=%d", outJbDylibIdxList, *outJbDylibIdxList, jbDylibIdxList, *jbDylibIdxListLen);
    }

        if (isShowDetailLog) {
            os_log(OS_LOG_DEFAULT, "hook_dyld generateHookedImageIndexList: curImgIdx=%d, isJbDylibIdx=%s", curImgIdx, boolToStr(isJbDylibIdx));
        }

替换后：

    dyldLog("*jbDylibIdxListLen=%d", *jbDylibIdxListLen);

    dyldLog("list end, jbDylibIdxList[%d]=%d", curListEndIdx, jbDylibIdxList[curListEndIdx]);

    dyldLog("now return outJbDylibIdxList=%p, *outJbDylibIdxList=%p, jbDylibIdxList=%p, *jbDylibIdxListLen=%d", outJbDylibIdxList, *outJbDylibIdxList, jbDylibIdxList, *jbDylibIdxListLen);

        dyldLog("curImgIdx=%d, isJbDylibIdx=%s", curImgIdx, boolToStr(isJbDylibIdx));

实现了，这个函数的参数部分，整体的替换。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:45:09

InstallHook函数名

只保留InstallHook中的函数名

正则：

        ?/?/? ?InstallHook\((\S+)\);
$1

替换前：

     InstallHook(chdir);
        InstallHook(fchdir);
        InstallHook(link);
        InstallHook(symlink);
        InstallHook(readlink);
        InstallHook(unlink);
        InstallHook(rmdir);
        InstallHook(rename);
        InstallHook(mkdir);
        InstallHook(fstat);
        InstallHook(lstat);
        InstallHook(stat);
        // InstallHook(fstat64);
        // InstallHook(lstat64);
        // InstallHook(stat64);
        InstallHook(chown);
        InstallHook(fchown);
        InstallHook(chmod);
        InstallHook(fchmod);
        InstallHook(umask);
        InstallHook(access);
        InstallHook(futimes);
        InstallHook(utimes);
        InstallHook(ftruncate);
        InstallHook(truncate);
        InstallHook(mknod);
        InstallHook(lchown);
        InstallHook(chflags);
        InstallHook(fchflags);
        InstallHook(statfs);

替换后：

chdir
fchdir
link
symlink
readlink
unlink
rmdir
rename
mkdir
fstat
lstat
stat
fstat64
lstat64
stat64
chown
fchown
chmod
fchmod
umask
access
futimes
utimes
ftruncate
truncate
mknod
lchown
chflags
fchflags
statfs

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:47:31

iPhone机型处理

去除iPhone机型中后面的部分

第一步

正则：

("iPhone [^"]+)".+,
$1",

替换前：

             //iPhone.
             @"iPhone1,1" : @[ @"iPhone 2G", @"GSM", @"A1203" ],
             @"iPhone1,2" : @[ @"iPhone 3G", @"GSM", @"A1241 / A13241" ],
             @"iPhone2,1" : @[ @"iPhone 3GS", @"GSM", @"A1303 / A13251" ],
             @"iPhone3,1" : @[ @"iPhone 4", @"GSM", @"A1332" ],
             @"iPhone3,2" : @[ @"iPhone 4", @"GSM Rev A", @"-" ],
             @"iPhone3,3" : @[ @"iPhone 4", @"CDMA", @"A1349" ],
             @"iPhone4,1" : @[ @"iPhone 4S", @"GSM+CDMA", @"A1387 / A14311" ],
             @"iPhone5,1" : @[ @"iPhone 5", @"GSM", @"A1428" ],
             @"iPhone5,2" : @[ @"iPhone 5", @"GSM+CDMA", @"A1429 / A14421" ],
             @"iPhone5,3" : @[ @"iPhone 5C", @"GSM", @"A1456 / A1532" ],
             @"iPhone5,4" : @[ @"iPhone 5C", @"Global", @"A1507 / A1516 / A1526 / A1529" ],
             @"iPhone6,1" : @[ @"iPhone 5S", @"GSM", @"A1433 / A1533" ],
             @"iPhone6,2" : @[ @"iPhone 5S", @"Global", @"A1457 / A1518 / A1528 / A1530" ],
             @"iPhone7,2" : @[ @"iPhone 6", @"N/A", @"A1549 / A1586" ],
             @"iPhone7,1" : @[ @"iPhone 6 Plus", @"N/A", @"A1522 / A1524" ],
             // added by Crifan Li, 20211014
             @"iPhone8,1" : @[ @"iPhone 6s", @"N/A", @"A1633 / A1688 / A1691 / A1700" ],
             @"iPhone8,2" : @[ @"iPhone 6s Plus", @"N/A", @"A1634 / A1687 / A1690 / A1699" ],
             @"iPhone8,4" : @[ @"iPhone SE (1st generation)", @"N/A", @"A1662 / A1723 / A1724" ],
             @"iPhone9,1" : @[ @"iPhone 7", @"N/A", @"A1660 / A1779 / A1780" ],
             @"iPhone9,3" : @[ @"iPhone 7", @"N/A", @"A1778" ],
             @"iPhone9,2" : @[ @"iPhone 7 Plus", @"N/A", @"A1661 / A1785 / A1786" ],
             @"iPhone9,4" : @[ @"iPhone 7 Plus", @"N/A", @"A1784" ],
             @"iPhone10,1" : @[ @"iPhone 8", @"N/A", @"A1863 / A1906 / A1907" ],
             @"iPhone10,4" : @[ @"iPhone 8", @"N/A", @"A1905" ],
             @"iPhone10,2" : @[ @"iPhone 8 Plus", @"N/A", @"A1864 / A1898 / A1899" ],
             @"iPhone10,5" : @[ @"iPhone 8 Plus", @"N/A", @"A1897" ],
             @"iPhone10,3" : @[ @"iPhone X", @"N/A", @"A1865 / A1902" ],
             @"iPhone10,6" : @[ @"iPhone X", @"N/A", @"A1901" ],
             @"iPhone11,8" : @[ @"iPhone XR", @"N/A", @"A1984 / A2105 / A2106 / A2108" ],
             @"iPhone11,2" : @[ @"iPhone XR", @"N/A", @"A1920 / A2097 / A2098 / A2100" ],
             @"iPhone11,6" : @[ @"iPhone XS Max", @"N/A", @"A1921 / A2101 / A2102 / A2104" ],
             @"iPhone11,4" : @[ @"iPhone XS Max", @"N/A", @"?" ],
             @"iPhone12,1" : @[ @"iPhone 11", @"N/A", @"A2111 / A2221 / A2223" ],
             @"iPhone12,3" : @[ @"iPhone 11 Pro", @"N/A", @"A2160 / A2215 / A2217" ],
             @"iPhone12,5" : @[ @"iPhone 11 Pro Max", @"N/A", @"A2161 / A2220 / A2218" ],
             @"iPhone12,8" : @[ @"iPhone SE (2nd generation)", @"N/A", @"A2275 / A2296 / A2298" ],
             @"iPhone13,1" : @[ @"iPhone 12 mini", @"N/A", @"A2176 / A2398 / A2400 / A2399" ],
             @"iPhone13,2" : @[ @"iPhone 12", @"N/A", @"A2172 / A2402 / A2404 / A2403" ],
             @"iPhone13,3" : @[ @"iPhone 12 Pro", @"N/A", @"A2341 / A2406 / A2407 / A2408" ],
             @"iPhone13,4" : @[ @"iPhone 12 Pro Max", @"N/A", @"A2342 / A2410 / A2411 / A2412" ],
             @"iPhone14,4" : @[ @"iPhone 13 mini", @"N/A", @"?" ],
             @"iPhone14,5" : @[ @"iPhone 13", @"N/A", @"?" ],
             @"iPhone14,2" : @[ @"iPhone 13 Pro", @"N/A", @"?" ],
             @"iPhone14,3" : @[ @"iPhone 13 Pro Max", @"N/A", @"?" ],

替换后：

             //iPhone.
             @"iPhone1,1" : @[ @"iPhone 2G",
             @"iPhone1,2" : @[ @"iPhone 3G",
             @"iPhone2,1" : @[ @"iPhone 3GS",
             @"iPhone3,1" : @[ @"iPhone 4",
             @"iPhone3,2" : @[ @"iPhone 4",
             @"iPhone3,3" : @[ @"iPhone 4",
             @"iPhone4,1" : @[ @"iPhone 4S",
             @"iPhone5,1" : @[ @"iPhone 5",
             @"iPhone5,2" : @[ @"iPhone 5",
             @"iPhone5,3" : @[ @"iPhone 5C",
             @"iPhone5,4" : @[ @"iPhone 5C",
             @"iPhone6,1" : @[ @"iPhone 5S",
             @"iPhone6,2" : @[ @"iPhone 5S",
             @"iPhone7,2" : @[ @"iPhone 6",
             @"iPhone7,1" : @[ @"iPhone 6 Plus",
             // added by Crifan Li, 20211014
             @"iPhone8,1" : @[ @"iPhone 6s",
             @"iPhone8,2" : @[ @"iPhone 6s Plus",
             @"iPhone8,4" : @[ @"iPhone SE (1st generation)",
             @"iPhone9,1" : @[ @"iPhone 7",
             @"iPhone9,3" : @[ @"iPhone 7",
             @"iPhone9,2" : @[ @"iPhone 7 Plus",
             @"iPhone9,4" : @[ @"iPhone 7 Plus",
             @"iPhone10,1" : @[ @"iPhone 8",
             @"iPhone10,4" : @[ @"iPhone 8",
             @"iPhone10,2" : @[ @"iPhone 8 Plus",
             @"iPhone10,5" : @[ @"iPhone 8 Plus",
             @"iPhone10,3" : @[ @"iPhone X",
             @"iPhone10,6" : @[ @"iPhone X",
             @"iPhone11,8" : @[ @"iPhone XR",
             @"iPhone11,2" : @[ @"iPhone XR",
             @"iPhone11,6" : @[ @"iPhone XS Max",
             @"iPhone11,4" : @[ @"iPhone XS Max",
             @"iPhone12,1" : @[ @"iPhone 11",
             @"iPhone12,3" : @[ @"iPhone 11 Pro",
             @"iPhone12,5" : @[ @"iPhone 11 Pro Max",
             @"iPhone12,8" : @[ @"iPhone SE (2nd generation)",
             @"iPhone13,1" : @[ @"iPhone 12 mini",
             @"iPhone13,2" : @[ @"iPhone 12",
             @"iPhone13,3" : @[ @"iPhone 12 Pro",
             @"iPhone13,4" : @[ @"iPhone 12 Pro Max",
             @"iPhone14,4" : @[ @"iPhone 13 mini",
             @"iPhone14,5" : @[ @"iPhone 13",
             @"iPhone14,2" : @[ @"iPhone 13 Pro",
             @"iPhone14,3" : @[ @"iPhone 13 Pro Max",

第二步

继续类似的：

把dict转list

正则：

(@".+?") : (@".+?”),
@[$1, $2],

替换前：

@"iPhone7,2" : @"iPhone 6",
@"iPhone7,1" : @"iPhone 6 Plus",
// added by Crifan Li, 20211014
@"iPhone8,1" : @"iPhone 6s",
@"iPhone8,2" : @"iPhone 6s Plus",
@"iPhone8,4" : @"iPhone SE 一代", //(1st generation)
@"iPhone9,1" : @"iPhone 7",
@"iPhone9,3" : @"iPhone 7 美版",
@"iPhone9,2" : @"iPhone 7 Plus",
@"iPhone9,4" : @"iPhone 7 Plus 美版",
@"iPhone10,1" : @"iPhone 8",
@"iPhone10,4" : @"iPhone 8 美版",
@"iPhone10,2" : @"iPhone 8 Plus",
@"iPhone10,5" : @"iPhone 8 Plus 美版",
@"iPhone10,3" : @"iPhone X",
@"iPhone10,6" : @"iPhone X 美版",
@"iPhone11,8" : @"iPhone XR",
@"iPhone11,2" : @"iPhone XS",
@"iPhone11,4" : @"iPhone XS Max",
@"iPhone11,6" : @"iPhone XS Max 美版",
@"iPhone12,1" : @"iPhone 11",
@"iPhone12,3" : @"iPhone 11 Pro",
@"iPhone12,5" : @"iPhone 11 Pro Max",
@"iPhone12,8" : @"iPhone SE 二代", //(2nd generation)
@"iPhone13,1" : @"iPhone 12 mini",
@"iPhone13,2" : @"iPhone 12",
@"iPhone13,3" : @"iPhone 12 Pro",
@"iPhone13,4" : @"iPhone 12 Pro Max",
@"iPhone14,4" : @"iPhone 13 mini",
@"iPhone14,5" : @"iPhone 13",
@"iPhone14,2" : @"iPhone 13 Pro",
@"iPhone14,3" : @"iPhone 13 Pro Max",

替换后：

@[@"iPhone7,2", @"iPhone 6"],
@[@"iPhone7,1", @"iPhone 6 Plus"],
// added by Crifan Li, 20211014
@[@"iPhone8,1", @"iPhone 6s"],
@[@"iPhone8,2", @"iPhone 6s Plus"],
@[@"iPhone8,4", @"iPhone SE 一代"], //(1st generation)
@[@"iPhone9,1", @"iPhone 7"],
@[@"iPhone9,3", @"iPhone 7 美版"],
@[@"iPhone9,2", @"iPhone 7 Plus"],
@[@"iPhone9,4", @"iPhone 7 Plus 美版"],
@[@"iPhone10,1", @"iPhone 8"],
@[@"iPhone10,4", @"iPhone 8 美版"],
@[@"iPhone10,2", @"iPhone 8 Plus"],
@[@"iPhone10,5", @"iPhone 8 Plus 美版"],
@[@"iPhone10,3", @"iPhone X"],
@[@"iPhone10,6", @"iPhone X 美版"],
@[@"iPhone11,8", @"iPhone XR"],
@[@"iPhone11,2", @"iPhone XS"],
@[@"iPhone11,4", @"iPhone XS Max"],
@[@"iPhone11,6", @"iPhone XS Max 美版"],
@[@"iPhone12,1", @"iPhone 11"],
@[@"iPhone12,3", @"iPhone 11 Pro"],
@[@"iPhone12,5", @"iPhone 11 Pro Max"],
@[@"iPhone12,8", @"iPhone SE 二代"], //(2nd generation)
@[@"iPhone13,1", @"iPhone 12 mini"],
@[@"iPhone13,2", @"iPhone 12"],
@[@"iPhone13,3", @"iPhone 12 Pro"],
@[@"iPhone13,4", @"iPhone 12 Pro Max"],
@[@"iPhone14,4", @"iPhone 13 mini"],
@[@"iPhone14,5", @"iPhone 13"],
@[@"iPhone14,2", @"iPhone 13 Pro"],
@[@"iPhone14,3", @"iPhone 13 Pro Max"],

用于后续写代码的机型定义中

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:52:13

去除IP地址的行

去除IP地址的行

正则：

https?://\d+\.\d+\.\d+\.\d+(:\d+)?/.*\n

替换前：

http://81.71.118.57:15012/
http://39.104.63.66:7302/?a=hongdian_get&s=9aaf37a2_jingqi_2103231619169754&k=J&d=468%08Il1dJ5bHNqWzEsWy&tm=1616487594401&sign=FB47FD0DF30329F441D863E0C3287ADA
https://sdk.sh9130.com/partner/order/
http://39.104.63.66:7302/?a=hongdian_get&s=9aaf37a2_jingqi_2103231619169754&k=G&d=468%08WzFd&tm=1616488059998&sign=4D59D639DF1F78672AEE5F5DD28D372A
http://152.136.11.196/wuxia_hongjian/online
...

变成：

https://sdk.sh9130.com/partner/order/
...

便于分析抓包中，非IP地址的链接内容。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:54:29

生成POS列表

生成POS列表

正则：

(\w+)\t\S+\s*
"$1",

把：

https://github.com/fxsjy/jieba

拷贝得到的：

n    普通名词    f    方位名词    s    处所名词    t    时间
nr    人名    ns    地名    nt    机构名    nw    作品名
nz    其他专名    v    普通动词    vd    动副词    vn    名动词
a    形容词    ad    副形词    an    名形词    d    副词
m    数量词    q    量词    r    代词    p    介词
c    连词    u    助词    xc    其他虚词    w    标点符号
PER    人名    LOC    地名    ORG    机构名    TIME    时间

变成：

"n", "f", "s", "t", "nr", "ns", "nt", "nw", "nz", "v", "vd", "vn", "a", "ad", "an", "d", "m", "q", "r", "p", "c", "u", "xc", "w", "PER", "LOC", "ORG", "TIME",

放到代码中：

        curPOS = ("n", "f", "s", "t", "nr", "ns", "nt", "nw", "nz", "v", "vd", "vn", "a", "ad", "an", "d", "m", "q", "r", "p", "c", "u", "xc", "w", "PER", "LOC", "ORG", "TIME")
        topTagList = jieba.analyse.extract_tags(noteStr, topK=10, withWeight=True, allowPOS=curPOS)

去使用。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:56:24

正则的group的可选项

正则的group的可选项

正则：

(\w+)\n+
($1)|

从：

debug
info
warning
warn
error
critical
exception
log

变成：

(debug)|(info)|(warning)|(warn)|(error)|(critical)|(exception)|(log)|

用于后续正则表达式的group的可选项：

    # logging.debug(
    # logging.warning(
    # logging.error(
    # logging.exception(
    CommonFunctionPList = [
        "logging\.((debug)|(info)|(warning)|(warn)|(error)|(critical)|(exception)|(log))",
。。。
    ]
    for curCommonFuncP in CommonFunctionPList:
        allCommonFunc = re.findall(curCommonFuncP, codeStr, re.I)
        curCommonFuncNum = len(allCommonFunc)
        specialKeyNum += curCommonFuncNum

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:57:44

过滤出html的tab标签列表

过滤出html的tab标签列表

保留tag标签

正则：

<(\w+)>\s.+$(\n[^<]+)?
        "$1",\n

从：

<a>    Defines a hyperlink
<abbr>    Defines an abbreviation or an acronym
<acronym>    Not supported in HTML5. Use <abbr> instead.
Defines an acronym
<address>    Defines contact information for the author/owner of a document
<applet>    Not supported in HTML5. Use <embed> or <object> instead.
Defines an embedded applet
<area>    Defines an area inside an image map
<article>    Defines an article
<aside>    Defines content aside from the page content
<audio>    Defines embedded sound content
<b>    Defines bold text
<base>    Specifies the base URL/target for all relative URLs in a document
<basefont>    Not supported in HTML5. Use CSS instead.
Specifies a default color, size, and font for all text in a document
<bdi>    Isolates a part of text that might be formatted in a different direction from other text outside it
<bdo>    Overrides the current text direction
<big>    Not supported in HTML5. Use CSS instead.
Defines big text
<blockquote>    Defines a section that is quoted from another source
<body>    Defines the document's body

    Defines a single line break
<button>    Defines a clickable button
<canvas>    Used to draw graphics, on the fly, via scripting (usually JavaScript)
<caption>    Defines a table caption
<center>    Not supported in HTML5. Use CSS instead.
Defines centered text
<cite>    Defines the title of a work
<code>    Defines a piece of computer code
<col>    Specifies column properties for each column within a <colgroup> element
<colgroup>    Specifies a group of one or more columns in a table for formatting
<data>    Adds a machine-readable translation of a given content
<datalist>    Specifies a list of pre-defined options for input controls
<dd>    Defines a description/value of a term in a description list
<del>    Defines text that has been deleted from a document
<details>    Defines additional details that the user can view or hide
<dfn>    Specifies a term that is going to be defined within the content
<dialog>    Defines a dialog box or window
<dir>    Not supported in HTML5. Use <ul> instead.
Defines a directory list
<div>    Defines a section in a document
<dl>    Defines a description list
<dt>    Defines a term/name in a description list
<em>    Defines emphasized text
<embed>    Defines a container for an external application
<fieldset>    Groups related elements in a form
<figcaption>    Defines a caption for a <figure> element
<figure>    Specifies self-contained content
<font>    Not supported in HTML5. Use CSS instead.
Defines font, color, and size for text
<footer>    Defines a footer for a document or section
<form>    Defines an HTML form for user input
<frame>    Not supported in HTML5.
Defines a window (a frame) in a frameset
<frameset>    Not supported in HTML5.
Defines a set of frames
<h1> to <h6>    Defines HTML headings
<head>    Contains metadata/information for the document
<header>    Defines a header for a document or section
<hr>    Defines a thematic change in the content
<html>    Defines the root of an HTML document
<i>    Defines a part of text in an alternate voice or mood
<iframe>    Defines an inline frame
<img>    Defines an image
<input>    Defines an input control
<ins>    Defines a text that has been inserted into a document
<kbd>    Defines keyboard input
<label>    Defines a label for an <input> element
<legend>    Defines a caption for a <fieldset> element
<li>    Defines a list item
<link>    Defines the relationship between a document and an external resource (most used to link to style sheets)
<main>    Specifies the main content of a document
<map>    Defines an image map
<mark>    Defines marked/highlighted text
<meta>    Defines metadata about an HTML document
<meter>    Defines a scalar measurement within a known range (a gauge)
<nav>    Defines navigation links
<noframes>    Not supported in HTML5.
Defines an alternate content for users that do not support frames
<noscript>    Defines an alternate content for users that do not support client-side scripts
<object>    Defines a container for an external application
<ol>    Defines an ordered list
<optgroup>    Defines a group of related options in a drop-down list
<option>    Defines an option in a drop-down list
<output>    Defines the result of a calculation
<p>    Defines a paragraph
<param>    Defines a parameter for an object
<picture>    Defines a container for multiple image resources
<pre>    Defines preformatted text
<progress>    Represents the progress of a task
<q>    Defines a short quotation
<rp>    Defines what to show in browsers that do not support ruby annotations
<rt>    Defines an explanation/pronunciation of characters (for East Asian typography)
<ruby>    Defines a ruby annotation (for East Asian typography)
<s>    Defines text that is no longer correct
<samp>    Defines sample output from a computer program
<script>    Defines a client-side script
<section>    Defines a section in a document
<select>    Defines a drop-down list
<small>    Defines smaller text
<source>    Defines multiple media resources for media elements (<video> and <audio>)
<span>    Defines a section in a document
<strike>    Not supported in HTML5. Use <del> or <s> instead.
Defines strikethrough text
<strong>    Defines important text
<style>    Defines style information for a document
<sub>    Defines subscripted text
<summary>    Defines a visible heading for a <details> element
<sup>    Defines superscripted text
<svg>    Defines a container for SVG graphics
<table>    Defines a table
<tbody>    Groups the body content in a table
<td>    Defines a cell in a table
<template>    Defines a container for content that should be hidden when the page loads
<textarea>    Defines a multiline input control (text area)
<tfoot>    Groups the footer content in a table
<th>    Defines a header cell in a table
<thead>    Groups the header content in a table
<time>    Defines a specific time (or datetime)
<title>    Defines a title for the document
<tr>    Defines a row in a table
<track>    Defines text tracks for media elements (<video> and <audio>)
<tt>    Not supported in HTML5. Use CSS instead.
Defines teletype text
<u>    Defines some text that is unarticulated and styled differently from normal text
<ul>    Defines an unordered list
<var>    Defines a variable
<video>    Defines embedded video content
<wbr>    Defines a possible line-break

变成：

        "a",

        "abbr",

        "acronym",
        "address",

        "applet",
        "area",

        "article",

        "aside",

        "audio",

        "b",

        "base",

        "basefont",
        "bdi",

        "bdo",

        "big",
        "blockquote",

        "body",

        "br",

        "button",

        "canvas",

        "caption",

        "center",
        "cite",

        "code",

        "col",

        "colgroup",

        "data",

        "datalist",

        "dd",

        "del",

        "details",

        "dfn",

        "dialog",

        "dir",
        "div",

        "dl",

        "dt",

        "em",

        "embed",

        "fieldset",

        "figcaption",

        "figure",

        "font",
        "footer",

        "form",

        "frame",
        "frameset",
        "h1",

        "head",

        "header",

        "hr",

        "html",

        "i",

        "iframe",

        "img",

        "input",

        "ins",

        "kbd",

        "label",

        "legend",

        "li",

        "link",

        "main",

        "map",

        "mark",

        "meta",

        "meter",

        "nav",

        "noframes",
        "noscript",

        "object",

        "ol",

        "optgroup",

        "option",

        "output",

        "p",

        "param",

        "picture",

        "pre",

        "progress",

        "q",

        "rp",

        "rt",

        "ruby",

        "s",

        "samp",

        "script",

        "section",

        "select",

        "small",

        "source",

        "span",

        "strike",
        "strong",

        "style",

        "sub",

        "summary",

        "sup",

        "svg",

        "table",

        "tbody",

        "td",

        "template",

        "textarea",

        "tfoot",

        "th",

        "thead",

        "time",

        "title",

        "tr",

        "track",

        "tt",
        "u",

        "ul",

        "var",

        "video",

        "wbr",

去除多余空行

再用正则：

\n\n+
\n

变成：

        "a",
        "abbr",
        "acronym",
        "address",
        "applet",
        "area",
        "article",
        "aside",
        "audio",
        "b",
        "base",
        "basefont",
        "bdi",
        "bdo",
        "big",
        "blockquote",
        "body",
        "br",
        "button",
        "canvas",
        "caption",
        "center",
        "cite",
        "code",
        "col",
        "colgroup",
        "data",
        "datalist",
        "dd",
        "del",
        "details",
        "dfn",
        "dialog",
        "dir",
        "div",
        "dl",
        "dt",
        "em",
        "embed",
        "fieldset",
        "figcaption",
        "figure",
        "font",
        "footer",
        "form",
        "frame",
        "frameset",
        "h1",
        "head",
        "header",
        "hr",
        "html",
        "i",
        "iframe",
        "img",
        "input",
        "ins",
        "kbd",
        "label",
        "legend",
        "li",
        "link",
        "main",
        "map",
        "mark",
        "meta",
        "meter",
        "nav",
        "noframes",
        "noscript",
        "object",
        "ol",
        "optgroup",
        "option",
        "output",
        "p",
        "param",
        "picture",
        "pre",
        "progress",
        "q",
        "rp",
        "rt",
        "ruby",
        "s",
        "samp",
        "script",
        "section",
        "select",
        "small",
        "source",
        "span",
        "strike",
        "strong",
        "style",
        "sub",
        "summary",
        "sup",
        "svg",
        "table",
        "tbody",
        "td",
        "template",
        "textarea",
        "tfoot",
        "th",
        "thead",
        "time",
        "title",
        "tr",
        "track",
        "tt",
        "u",
        "ul",
        "var",
        "video",
        "wbr",

-》用于：

【未解决】用Python实现从代码字符串中检测出是何种编程语言

中，检测字符串是否是html语言，其中判断tag是否是html的tag

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 11:00:50

css提取属性key

从css的属性的表格中提取出属性的key的列表

从

CSS Properties - CSS Reference

中想要获取到所有的属性key的列表

去用VSCode的正则处理

拷贝过去：

align-content    Specifies the alignment between the lines inside a flexible container when the items do not use all available space
align-items    Specifies the alignment for items inside a flexible container
align-self    Specifies the alignment for selected items inside a flexible container
all    Resets all properties (except unicode-bidi and direction)
animation    A shorthand property for all the animation-* properties
animation-delay    Specifies a delay for the start of an animation
animation-direction    Specifies whether an animation should be played forwards, backwards or in alternate cycles
animation-duration    Specifies how long an animation should take to complete one cycle
animation-fill-mode    Specifies a style for the element when the animation is not playing (before it starts, after it ends, or both)
animation-iteration-count    Specifies the number of times an animation should be played
animation-name    Specifies a name for the @keyframes animation
animation-play-state    Specifies whether the animation is running or paused
animation-timing-function    Specifies the speed curve of an animation
B
backface-visibility    Defines whether or not the back face of an element should be visible when facing the user
background    A shorthand property for all the background-* properties
background-attachment    Sets whether a background image scrolls with the rest of the page, or is fixed
background-blend-mode    Specifies the blending mode of each background layer (color/image)
background-clip    Defines how far the background (color or image) should extend within an element
background-color    Specifies the background color of an element
background-image    Specifies one or more background images for an element
background-origin    Specifies the origin position of a background image
background-position    Specifies the position of a background image
background-repeat    Sets if/how a background image will be repeated
background-size    Specifies the size of the background images
border    A shorthand property for border-width, border-style and border-color
border-bottom    A shorthand property for border-bottom-width, border-bottom-style and border-bottom-color
border-bottom-color    Sets the color of the bottom border
border-bottom-left-radius    Defines the radius of the border of the bottom-left corner
border-bottom-right-radius    Defines the radius of the border of the bottom-right corner
border-bottom-style    Sets the style of the bottom border
border-bottom-width    Sets the width of the bottom border
border-collapse    Sets whether table borders should collapse into a single border or be separated
border-color    Sets the color of the four borders
border-image    A shorthand property for all the border-image-* properties
border-image-outset    Specifies the amount by which the border image area extends beyond the border box
border-image-repeat    Specifies whether the border image should be repeated, rounded or stretched
border-image-slice    Specifies how to slice the border image
border-image-source    Specifies the path to the image to be used as a border
border-image-width    Specifies the width of the border image
border-left    A shorthand property for all the border-left-* properties
border-left-color    Sets the color of the left border
border-left-style    Sets the style of the left border
border-left-width    Sets the width of the left border
border-radius    A shorthand property for the four border-*-radius properties
border-right    A shorthand property for all the border-right-* properties
border-right-color    Sets the color of the right border
border-right-style    Sets the style of the right border
border-right-width    Sets the width of the right border
border-spacing    Sets the distance between the borders of adjacent cells
border-style    Sets the style of the four borders
border-top    A shorthand property for border-top-width, border-top-style and border-top-color
border-top-color    Sets the color of the top border
border-top-left-radius    Defines the radius of the border of the top-left corner
border-top-right-radius    Defines the radius of the border of the top-right corner
border-top-style    Sets the style of the top border
border-top-width    Sets the width of the top border
border-width    Sets the width of the four borders
bottom    Sets the elements position, from the bottom of its parent element
box-decoration-break    Sets the behavior of the background and border of an element at page-break, or, for in-line elements, at line-break.
box-shadow    Attaches one or more shadows to an element
box-sizing    Defines how the width and height of an element are calculated: should they include padding and borders, or not
break-after    Specifies whether or not a page-, column-, or region-break should occur after the specified element
break-before    Specifies whether or not a page-, column-, or region-break should occur before the specified element
break-inside    Specifies whether or not a page-, column-, or region-break should occur inside the specified element
C
caption-side    Specifies the placement of a table caption
caret-color    Specifies the color of the cursor (caret) in inputs, textareas, or any element that is editable
@charset    Specifies the character encoding used in the style sheet
clear    Specifies on which sides of an element floating elements are not allowed to float
clip    Clips an absolutely positioned element
color    Sets the color of text
column-count    Specifies the number of columns an element should be divided into
column-fill    Specifies how to fill columns, balanced or not
column-gap    Specifies the gap between the columns
column-rule    A shorthand property for all the column-rule-* properties
column-rule-color    Specifies the color of the rule between columns
column-rule-style    Specifies the style of the rule between columns
column-rule-width    Specifies the width of the rule between columns
column-span    Specifies how many columns an element should span across
column-width    Specifies the column width
columns    A shorthand property for column-width and column-count
content    Used with the :before and :after pseudo-elements, to insert generated content
counter-increment    Increases or decreases the value of one or more CSS counters
counter-reset    Creates or resets one or more CSS counters
cursor    Specifies the mouse cursor to be displayed when pointing over an element
D
direction    Specifies the text direction/writing direction
display    Specifies how a certain HTML element should be displayed
E
empty-cells    Specifies whether or not to display borders and background on empty cells in a table
F
filter    Defines effects (e.g. blurring or color shifting) on an element before the element is displayed
flex    A shorthand property for the flex-grow, flex-shrink, and the flex-basis properties
flex-basis    Specifies the initial length of a flexible item
flex-direction    Specifies the direction of the flexible items
flex-flow    A shorthand property for the flex-direction and the flex-wrap properties
flex-grow    Specifies how much the item will grow relative to the rest
flex-shrink    Specifies how the item will shrink relative to the rest
flex-wrap    Specifies whether the flexible items should wrap or not
float    Specifies whether or not a box should float
font    A shorthand property for the font-style, font-variant, font-weight, font-size/line-height, and the font-family properties
@font-face    A rule that allows websites to download and use fonts other than the "web-safe" fonts
font-family    Specifies the font family for text
font-feature-settings    Allows control over advanced typographic features in OpenType fonts
@font-feature-values    Allows authors to use a common name in font-variant-alternate for feature activated differently in OpenType
font-kerning    Controls the usage of the kerning information (how letters are spaced)
font-language-override    Controls the usage of language-specific glyphs in a typeface
font-size    Specifies the font size of text
font-size-adjust    Preserves the readability of text when font fallback occurs
font-stretch    Selects a normal, condensed, or expanded face from a font family
font-style    Specifies the font style for text
font-synthesis    Controls which missing typefaces (bold or italic) may be synthesized by the browser
font-variant    Specifies whether or not a text should be displayed in a small-caps font
font-variant-alternates    Controls the usage of alternate glyphs associated to alternative names defined in @font-feature-values
font-variant-caps    Controls the usage of alternate glyphs for capital letters
font-variant-east-asian    Controls the usage of alternate glyphs for East Asian scripts (e.g Japanese and Chinese)
font-variant-ligatures    Controls which ligatures and contextual forms are used in textual content of the elements it applies to
font-variant-numeric    Controls the usage of alternate glyphs for numbers, fractions, and ordinal markers
font-variant-position    Controls the usage of alternate glyphs of smaller size positioned as superscript or subscript regarding the baseline of the font
font-weight    Specifies the weight of a font
G
grid    A shorthand property for the grid-template-rows, grid-template-columns, grid-template-areas, grid-auto-rows, grid-auto-columns, and the grid-auto-flow properties
grid-area    Either specifies a name for the grid item, or this property is a shorthand property for the grid-row-start, grid-column-start, grid-row-end, and grid-column-end properties
grid-auto-columns    Specifies a default column size
grid-auto-flow    Specifies how auto-placed items are inserted in the grid
grid-auto-rows    Specifies a default row size
grid-column    A shorthand property for the grid-column-start and the grid-column-end properties
grid-column-end    Specifies where to end the grid item
grid-column-gap    Specifies the size of the gap between columns
grid-column-start    Specifies where to start the grid item
grid-gap    A shorthand property for the grid-row-gap and grid-column-gap properties
grid-row    A shorthand property for the grid-row-start and the grid-row-end properties
grid-row-end    Specifies where to end the grid item
grid-row-gap    Specifies the size of the gap between rows
grid-row-start    Specifies where to start the grid item
grid-template    A shorthand property for the grid-template-rows, grid-template-columns and grid-areas properties
grid-template-areas    Specifies how to display columns and rows, using named grid items
grid-template-columns    Specifies the size of the columns, and how many columns in a grid layout
grid-template-rows    Specifies the size of the rows in a grid layout
H
hanging-punctuation    Specifies whether a punctuation character may be placed outside the line box
height    Sets the height of an element
hyphens    Sets how to split words to improve the layout of paragraphs
I
image-rendering    Gives a hint to the browser about what aspects of an image are most important to preserve when the image is scaled
@import    Allows you to import a style sheet into another style sheet
isolation    Defines whether an element must create a new stacking content
J
justify-content    Specifies the alignment between the items inside a flexible container when the items do not use all available space
K
@keyframes    Specifies the animation code
L
left    Specifies the left position of a positioned element
letter-spacing    Increases or decreases the space between characters in a text
line-break    Specifies how/if to break lines
line-height    Sets the line height
list-style    Sets all the properties for a list in one declaration
list-style-image    Specifies an image as the list-item marker
list-style-position    Specifies the position of the list-item markers (bullet points)
list-style-type    Specifies the type of list-item marker
M
margin    Sets all the margin properties in one declaration
margin-bottom    Sets the bottom margin of an element
margin-left    Sets the left margin of an element
margin-right    Sets the right margin of an element
margin-top    Sets the top margin of an element
mask    Hides an element by masking or clipping the image at specific places
mask-type    Specifies whether a mask element is used as a luminance or an alpha mask
max-height    Sets the maximum height of an element
max-width    Sets the maximum width of an element
@media    Sets the style rules for different media types/devices/sizes
min-height    Sets the minimum height of an element
min-width    Sets the minimum width of an element
mix-blend-mode    Specifies how an element's content should blend with its direct parent background
O
object-fit    Specifies how the contents of a replaced element should be fitted to the box established by its used height and width
object-position    Specifies the alignment of the replaced element inside its box
opacity    Sets the opacity level for an element
order    Sets the order of the flexible item, relative to the rest
orphans    Sets the minimum number of lines that must be left at the bottom of a page when a page break occurs inside an element
outline    A shorthand property for the outline-width, outline-style, and the outline-color properties
outline-color    Sets the color of an outline
outline-offset    Offsets an outline, and draws it beyond the border edge
outline-style    Sets the style of an outline
outline-width    Sets the width of an outline
overflow
Specifies what happens if content overflows an element's box
overflow-wrap    Specifies whether or not the browser may break lines within words in order to prevent overflow (when a string is too long to fit its containing box)
overflow-x    Specifies whether or not to clip the left/right edges of the content, if it overflows the element's content area
overflow-y    Specifies whether or not to clip the top/bottom edges of the content, if it overflows the element's content area
P
padding    A shorthand property for all the padding-* properties
padding-bottom    Sets the bottom padding of an element
padding-left    Sets the left padding of an element
padding-right    Sets the right padding of an element
padding-top    Sets the top padding of an element
page-break-after    Sets the page-break behavior after an element
page-break-before    Sets the page-break behavior before an element
page-break-inside    Sets the page-break behavior inside an element
perspective    Gives a 3D-positioned element some perspective
perspective-origin    Defines at which position the user is looking at the 3D-positioned element
pointer-events    Defines whether or not an element reacts to pointer events
position    Specifies the type of positioning method used for an element (static, relative, absolute or fixed)
Q
quotes    Sets the type of quotation marks for embedded quotations
R
resize    Defines if (and how) an element is resizable by the user
right    Specifies the right position of a positioned element
S
scroll-behavior    Specifies whether to smoothly animate the scroll position in a scrollable box, instead of a straight jump
T
tab-size    Specifies the width of a tab character
table-layout    Defines the algorithm used to lay out table cells, rows, and columns
text-align    Specifies the horizontal alignment of text
text-align-last    Describes how the last line of a block or a line right before a forced line break is aligned when text-align is "justify"
text-combine-upright    Specifies the combination of multiple characters into the space of a single character
text-decoration    Specifies the decoration added to text
text-decoration-color    Specifies the color of the text-decoration
text-decoration-line    Specifies the type of line in a text-decoration
text-decoration-style    Specifies the style of the line in a text decoration
text-indent    Specifies the indentation of the first line in a text-block
text-justify    Specifies the justification method used when text-align is "justify"
text-orientation    Defines the orientation of the text in a line
text-overflow    Specifies what should happen when text overflows the containing element
text-shadow    Adds shadow to text
text-transform    Controls the capitalization of text
text-underline-position    Specifies the position of the underline which is set using the text-decoration property
top    Specifies the top position of a positioned element
transform    Applies a 2D or 3D transformation to an element
transform-origin    Allows you to change the position on transformed elements
transform-style    Specifies how nested elements are rendered in 3D space
transition    A shorthand property for all the transition-* properties
transition-delay    Specifies when the transition effect will start
transition-duration    Specifies how many seconds or milliseconds a transition effect takes to complete
transition-property    Specifies the name of the CSS property the transition effect is for
transition-timing-function    Specifies the speed curve of the transition effect
U
unicode-bidi    Used together with the direction property to set or return whether the text should be overridden to support multiple languages in the same document
user-select    Specifies whether the text of an element can be selected
V
vertical-align    Sets the vertical alignment of an element
visibility    Specifies whether or not an element is visible
W
white-space    Specifies how white-space inside an element is handled
widows    Sets the minimum number of lines that must be left at the top of a page when a page break occurs inside an element
width    Sets the width of an element
word-break    Specifies how words should break when reaching the end of a line
word-spacing    Increases or decreases the space between words in a text
word-wrap    Allows long, unbreakable words to be broken and wrap to the next line
writing-mode    Specifies whether lines of text are laid out horizontally or vertically
Z
z-index    Sets the stack order of a positioned element

去掉其中的大写字母

正则：

^[A-Z]$\n

变成：

align-content    Specifies the alignment between the lines inside a flexible container when the items do not use all available space
align-items    Specifies the alignment for items inside a flexible container
align-self    Specifies the alignment for selected items inside a flexible container
all    Resets all properties (except unicode-bidi and direction)
animation    A shorthand property for all the animation-* properties
animation-delay    Specifies a delay for the start of an animation
animation-direction    Specifies whether an animation should be played forwards, backwards or in alternate cycles
animation-duration    Specifies how long an animation should take to complete one cycle
animation-fill-mode    Specifies a style for the element when the animation is not playing (before it starts, after it ends, or both)
animation-iteration-count    Specifies the number of times an animation should be played
animation-name    Specifies a name for the @keyframes animation
animation-play-state    Specifies whether the animation is running or paused
animation-timing-function    Specifies the speed curve of an animation
backface-visibility    Defines whether or not the back face of an element should be visible when facing the user
background    A shorthand property for all the background-* properties
background-attachment    Sets whether a background image scrolls with the rest of the page, or is fixed
background-blend-mode    Specifies the blending mode of each background layer (color/image)
background-clip    Defines how far the background (color or image) should extend within an element
background-color    Specifies the background color of an element
background-image    Specifies one or more background images for an element
background-origin    Specifies the origin position of a background image
background-position    Specifies the position of a background image
background-repeat    Sets if/how a background image will be repeated
background-size    Specifies the size of the background images
border    A shorthand property for border-width, border-style and border-color
border-bottom    A shorthand property for border-bottom-width, border-bottom-style and border-bottom-color
border-bottom-color    Sets the color of the bottom border
border-bottom-left-radius    Defines the radius of the border of the bottom-left corner
border-bottom-right-radius    Defines the radius of the border of the bottom-right corner
border-bottom-style    Sets the style of the bottom border
border-bottom-width    Sets the width of the bottom border
border-collapse    Sets whether table borders should collapse into a single border or be separated
border-color    Sets the color of the four borders
border-image    A shorthand property for all the border-image-* properties
border-image-outset    Specifies the amount by which the border image area extends beyond the border box
border-image-repeat    Specifies whether the border image should be repeated, rounded or stretched
border-image-slice    Specifies how to slice the border image
border-image-source    Specifies the path to the image to be used as a border
border-image-width    Specifies the width of the border image
border-left    A shorthand property for all the border-left-* properties
border-left-color    Sets the color of the left border
border-left-style    Sets the style of the left border
border-left-width    Sets the width of the left border
border-radius    A shorthand property for the four border-*-radius properties
border-right    A shorthand property for all the border-right-* properties
border-right-color    Sets the color of the right border
border-right-style    Sets the style of the right border
border-right-width    Sets the width of the right border
border-spacing    Sets the distance between the borders of adjacent cells
border-style    Sets the style of the four borders
border-top    A shorthand property for border-top-width, border-top-style and border-top-color
border-top-color    Sets the color of the top border
border-top-left-radius    Defines the radius of the border of the top-left corner
border-top-right-radius    Defines the radius of the border of the top-right corner
border-top-style    Sets the style of the top border
border-top-width    Sets the width of the top border
border-width    Sets the width of the four borders
bottom    Sets the elements position, from the bottom of its parent element
box-decoration-break    Sets the behavior of the background and border of an element at page-break, or, for in-line elements, at line-break.
box-shadow    Attaches one or more shadows to an element
box-sizing    Defines how the width and height of an element are calculated: should they include padding and borders, or not
break-after    Specifies whether or not a page-, column-, or region-break should occur after the specified element
break-before    Specifies whether or not a page-, column-, or region-break should occur before the specified element
break-inside    Specifies whether or not a page-, column-, or region-break should occur inside the specified element
caption-side    Specifies the placement of a table caption
caret-color    Specifies the color of the cursor (caret) in inputs, textareas, or any element that is editable
@charset    Specifies the character encoding used in the style sheet
clear    Specifies on which sides of an element floating elements are not allowed to float
clip    Clips an absolutely positioned element
color    Sets the color of text
column-count    Specifies the number of columns an element should be divided into
column-fill    Specifies how to fill columns, balanced or not
column-gap    Specifies the gap between the columns
column-rule    A shorthand property for all the column-rule-* properties
column-rule-color    Specifies the color of the rule between columns
column-rule-style    Specifies the style of the rule between columns
column-rule-width    Specifies the width of the rule between columns
column-span    Specifies how many columns an element should span across
column-width    Specifies the column width
columns    A shorthand property for column-width and column-count
content    Used with the :before and :after pseudo-elements, to insert generated content
counter-increment    Increases or decreases the value of one or more CSS counters
counter-reset    Creates or resets one or more CSS counters
cursor    Specifies the mouse cursor to be displayed when pointing over an element
direction    Specifies the text direction/writing direction
display    Specifies how a certain HTML element should be displayed
empty-cells    Specifies whether or not to display borders and background on empty cells in a table
filter    Defines effects (e.g. blurring or color shifting) on an element before the element is displayed
flex    A shorthand property for the flex-grow, flex-shrink, and the flex-basis properties
flex-basis    Specifies the initial length of a flexible item
flex-direction    Specifies the direction of the flexible items
flex-flow    A shorthand property for the flex-direction and the flex-wrap properties
flex-grow    Specifies how much the item will grow relative to the rest
flex-shrink    Specifies how the item will shrink relative to the rest
flex-wrap    Specifies whether the flexible items should wrap or not
float    Specifies whether or not a box should float
font    A shorthand property for the font-style, font-variant, font-weight, font-size/line-height, and the font-family properties
@font-face    A rule that allows websites to download and use fonts other than the "web-safe" fonts
font-family    Specifies the font family for text
font-feature-settings    Allows control over advanced typographic features in OpenType fonts
@font-feature-values    Allows authors to use a common name in font-variant-alternate for feature activated differently in OpenType
font-kerning    Controls the usage of the kerning information (how letters are spaced)
font-language-override    Controls the usage of language-specific glyphs in a typeface
font-size    Specifies the font size of text
font-size-adjust    Preserves the readability of text when font fallback occurs
font-stretch    Selects a normal, condensed, or expanded face from a font family
font-style    Specifies the font style for text
font-synthesis    Controls which missing typefaces (bold or italic) may be synthesized by the browser
font-variant    Specifies whether or not a text should be displayed in a small-caps font
font-variant-alternates    Controls the usage of alternate glyphs associated to alternative names defined in @font-feature-values
font-variant-caps    Controls the usage of alternate glyphs for capital letters
font-variant-east-asian    Controls the usage of alternate glyphs for East Asian scripts (e.g Japanese and Chinese)
font-variant-ligatures    Controls which ligatures and contextual forms are used in textual content of the elements it applies to
font-variant-numeric    Controls the usage of alternate glyphs for numbers, fractions, and ordinal markers
font-variant-position    Controls the usage of alternate glyphs of smaller size positioned as superscript or subscript regarding the baseline of the font
font-weight    Specifies the weight of a font
grid    A shorthand property for the grid-template-rows, grid-template-columns, grid-template-areas, grid-auto-rows, grid-auto-columns, and the grid-auto-flow properties
grid-area    Either specifies a name for the grid item, or this property is a shorthand property for the grid-row-start, grid-column-start, grid-row-end, and grid-column-end properties
grid-auto-columns    Specifies a default column size
grid-auto-flow    Specifies how auto-placed items are inserted in the grid
grid-auto-rows    Specifies a default row size
grid-column    A shorthand property for the grid-column-start and the grid-column-end properties
grid-column-end    Specifies where to end the grid item
grid-column-gap    Specifies the size of the gap between columns
grid-column-start    Specifies where to start the grid item
grid-gap    A shorthand property for the grid-row-gap and grid-column-gap properties
grid-row    A shorthand property for the grid-row-start and the grid-row-end properties
grid-row-end    Specifies where to end the grid item
grid-row-gap    Specifies the size of the gap between rows
grid-row-start    Specifies where to start the grid item
grid-template    A shorthand property for the grid-template-rows, grid-template-columns and grid-areas properties
grid-template-areas    Specifies how to display columns and rows, using named grid items
grid-template-columns    Specifies the size of the columns, and how many columns in a grid layout
grid-template-rows    Specifies the size of the rows in a grid layout
hanging-punctuation    Specifies whether a punctuation character may be placed outside the line box
height    Sets the height of an element
hyphens    Sets how to split words to improve the layout of paragraphs
image-rendering    Gives a hint to the browser about what aspects of an image are most important to preserve when the image is scaled
@import    Allows you to import a style sheet into another style sheet
isolation    Defines whether an element must create a new stacking content
justify-content    Specifies the alignment between the items inside a flexible container when the items do not use all available space
@keyframes    Specifies the animation code
left    Specifies the left position of a positioned element
letter-spacing    Increases or decreases the space between characters in a text
line-break    Specifies how/if to break lines
line-height    Sets the line height
list-style    Sets all the properties for a list in one declaration
list-style-image    Specifies an image as the list-item marker
list-style-position    Specifies the position of the list-item markers (bullet points)
list-style-type    Specifies the type of list-item marker
margin    Sets all the margin properties in one declaration
margin-bottom    Sets the bottom margin of an element
margin-left    Sets the left margin of an element
margin-right    Sets the right margin of an element
margin-top    Sets the top margin of an element
mask    Hides an element by masking or clipping the image at specific places
mask-type    Specifies whether a mask element is used as a luminance or an alpha mask
max-height    Sets the maximum height of an element
max-width    Sets the maximum width of an element
@media    Sets the style rules for different media types/devices/sizes
min-height    Sets the minimum height of an element
min-width    Sets the minimum width of an element
mix-blend-mode    Specifies how an element's content should blend with its direct parent background
object-fit    Specifies how the contents of a replaced element should be fitted to the box established by its used height and width
object-position    Specifies the alignment of the replaced element inside its box
opacity    Sets the opacity level for an element
order    Sets the order of the flexible item, relative to the rest
orphans    Sets the minimum number of lines that must be left at the bottom of a page when a page break occurs inside an element
outline    A shorthand property for the outline-width, outline-style, and the outline-color properties
outline-color    Sets the color of an outline
outline-offset    Offsets an outline, and draws it beyond the border edge
outline-style    Sets the style of an outline
outline-width    Sets the width of an outline
overflow
Specifies what happens if content overflows an element's box
overflow-wrap    Specifies whether or not the browser may break lines within words in order to prevent overflow (when a string is too long to fit its containing box)
overflow-x    Specifies whether or not to clip the left/right edges of the content, if it overflows the element's content area
overflow-y    Specifies whether or not to clip the top/bottom edges of the content, if it overflows the element's content area
padding    A shorthand property for all the padding-* properties
padding-bottom    Sets the bottom padding of an element
padding-left    Sets the left padding of an element
padding-right    Sets the right padding of an element
padding-top    Sets the top padding of an element
page-break-after    Sets the page-break behavior after an element
page-break-before    Sets the page-break behavior before an element
page-break-inside    Sets the page-break behavior inside an element
perspective    Gives a 3D-positioned element some perspective
perspective-origin    Defines at which position the user is looking at the 3D-positioned element
pointer-events    Defines whether or not an element reacts to pointer events
position    Specifies the type of positioning method used for an element (static, relative, absolute or fixed)
quotes    Sets the type of quotation marks for embedded quotations
resize    Defines if (and how) an element is resizable by the user
right    Specifies the right position of a positioned element
scroll-behavior    Specifies whether to smoothly animate the scroll position in a scrollable box, instead of a straight jump
tab-size    Specifies the width of a tab character
table-layout    Defines the algorithm used to lay out table cells, rows, and columns
text-align    Specifies the horizontal alignment of text
text-align-last    Describes how the last line of a block or a line right before a forced line break is aligned when text-align is "justify"
text-combine-upright    Specifies the combination of multiple characters into the space of a single character
text-decoration    Specifies the decoration added to text
text-decoration-color    Specifies the color of the text-decoration
text-decoration-line    Specifies the type of line in a text-decoration
text-decoration-style    Specifies the style of the line in a text decoration
text-indent    Specifies the indentation of the first line in a text-block
text-justify    Specifies the justification method used when text-align is "justify"
text-orientation    Defines the orientation of the text in a line
text-overflow    Specifies what should happen when text overflows the containing element
text-shadow    Adds shadow to text
text-transform    Controls the capitalization of text
text-underline-position    Specifies the position of the underline which is set using the text-decoration property
top    Specifies the top position of a positioned element
transform    Applies a 2D or 3D transformation to an element
transform-origin    Allows you to change the position on transformed elements
transform-style    Specifies how nested elements are rendered in 3D space
transition    A shorthand property for all the transition-* properties
transition-delay    Specifies when the transition effect will start
transition-duration    Specifies how many seconds or milliseconds a transition effect takes to complete
transition-property    Specifies the name of the CSS property the transition effect is for
transition-timing-function    Specifies the speed curve of the transition effect
unicode-bidi    Used together with the direction property to set or return whether the text should be overridden to support multiple languages in the same document
user-select    Specifies whether the text of an element can be selected
vertical-align    Sets the vertical alignment of an element
visibility    Specifies whether or not an element is visible
white-space    Specifies how white-space inside an element is handled
widows    Sets the minimum number of lines that must be left at the top of a page when a page break occurs inside an element
width    Sets the width of an element
word-break    Specifies how words should break when reaching the end of a line
word-spacing    Increases or decreases the space between words in a text
word-wrap    Allows long, unbreakable words to be broken and wrap to the next line
writing-mode    Specifies whether lines of text are laid out horizontally or vertically
z-index    Sets the stack order of a positioned element

把overflow后面的空格改为 tab

正则：

([\w+\-@]+)\t.+$
    "$1",

替换成：

    "align-content",
    "align-items",
    "align-self",
    "all",
    "animation",
    "animation-delay",
    "animation-direction",
    "animation-duration",
    "animation-fill-mode",
    "animation-iteration-count",
    "animation-name",
    "animation-play-state",
    "animation-timing-function",
    "backface-visibility",
    "background",
    "background-attachment",
    "background-blend-mode",
    "background-clip",
    "background-color",
    "background-image",
    "background-origin",
    "background-position",
    "background-repeat",
    "background-size",
    "border",
    "border-bottom",
    "border-bottom-color",
    "border-bottom-left-radius",
    "border-bottom-right-radius",
    "border-bottom-style",
    "border-bottom-width",
    "border-collapse",
    "border-color",
    "border-image",
    "border-image-outset",
    "border-image-repeat",
    "border-image-slice",
    "border-image-source",
    "border-image-width",
    "border-left",
    "border-left-color",
    "border-left-style",
    "border-left-width",
    "border-radius",
    "border-right",
    "border-right-color",
    "border-right-style",
    "border-right-width",
    "border-spacing",
    "border-style",
    "border-top",
    "border-top-color",
    "border-top-left-radius",
    "border-top-right-radius",
    "border-top-style",
    "border-top-width",
    "border-width",
    "bottom",
    "box-decoration-break",
    "box-shadow",
    "box-sizing",
    "break-after",
    "break-before",
    "break-inside",
    "caption-side",
    "caret-color",
    "@charset",
    "clear",
    "clip",
    "color",
    "column-count",
    "column-fill",
    "column-gap",
    "column-rule",
    "column-rule-color",
    "column-rule-style",
    "column-rule-width",
    "column-span",
    "column-width",
    "columns",
    "content",
    "counter-increment",
    "counter-reset",
    "cursor",
    "direction",
    "display",
    "empty-cells",
    "filter",
    "flex",
    "flex-basis",
    "flex-direction",
    "flex-flow",
    "flex-grow",
    "flex-shrink",
    "flex-wrap",
    "float",
    "font",
    "@font-face",
    "font-family",
    "font-feature-settings",
    "@font-feature-values",
    "font-kerning",
    "font-language-override",
    "font-size",
    "font-size-adjust",
    "font-stretch",
    "font-style",
    "font-synthesis",
    "font-variant",
    "font-variant-alternates",
    "font-variant-caps",
    "font-variant-east-asian",
    "font-variant-ligatures",
    "font-variant-numeric",
    "font-variant-position",
    "font-weight",
    "grid",
    "grid-area",
    "grid-auto-columns",
    "grid-auto-flow",
    "grid-auto-rows",
    "grid-column",
    "grid-column-end",
    "grid-column-gap",
    "grid-column-start",
    "grid-gap",
    "grid-row",
    "grid-row-end",
    "grid-row-gap",
    "grid-row-start",
    "grid-template",
    "grid-template-areas",
    "grid-template-columns",
    "grid-template-rows",
    "hanging-punctuation",
    "height",
    "hyphens",
    "image-rendering",
    "@import",
    "isolation",
    "justify-content",
    "@keyframes",
    "left",
    "letter-spacing",
    "line-break",
    "line-height",
    "list-style",
    "list-style-image",
    "list-style-position",
    "list-style-type",
    "margin",
    "margin-bottom",
    "margin-left",
    "margin-right",
    "margin-top",
    "mask",
    "mask-type",
    "max-height",
    "max-width",
    "@media",
    "min-height",
    "min-width",
    "mix-blend-mode",
    "object-fit",
    "object-position",
    "opacity",
    "order",
    "orphans",
    "outline",
    "outline-color",
    "outline-offset",
    "outline-style",
    "outline-width",
    "overflow",
    "overflow-wrap",
    "overflow-x",
    "overflow-y",
    "padding",
    "padding-bottom",
    "padding-left",
    "padding-right",
    "padding-top",
    "page-break-after",
    "page-break-before",
    "page-break-inside",
    "perspective",
    "perspective-origin",
    "pointer-events",
    "position",
    "quotes",
    "resize",
    "right",
    "scroll-behavior",
    "tab-size",
    "table-layout",
    "text-align",
    "text-align-last",
    "text-combine-upright",
    "text-decoration",
    "text-decoration-color",
    "text-decoration-line",
    "text-decoration-style",
    "text-indent",
    "text-justify",
    "text-orientation",
    "text-overflow",
    "text-shadow",
    "text-transform",
    "text-underline-position",
    "top",
    "transform",
    "transform-origin",
    "transform-style",
    "transition",
    "transition-delay",
    "transition-duration",
    "transition-property",
    "transition-timing-function",
    "unicode-bidi",
    "user-select",
    "vertical-align",
    "visibility",
    "white-space",
    "widows",
    "width",
    "word-break",
    "word-spacing",
    "word-wrap",
    "writing-mode",
    "z-index",

放到代码中：

即可使用。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 11:05:37

只保留游戏名后加上顿号

只保留游戏名后加上顿号

正则：

[\w\.]+/([^\|/]+)\|http.+\s*
$1、

把：

com.sy.fsyhj.vivo/浮生妖绘卷|https://gameapkbddl.vivo.com.cn/appstore/developer/soft/20201022/202010221943274reut.apk
com.aiyou.jianzongqy.vivo/剑踪情缘|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20201019/202010191206022ecy5.apk
com.youyan.xszn.vivo/仙神之怒|https://gameapkbddl.vivo.com.cn/appstore/developer/soft/20200519/202005191821212583555.apk
com.cmcx.xjhsl.vivo/仙界幻世录|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20190531/201905311652384109085.apk
com.game.hundunxmj.vivo/混沌仙魔诀|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20200518/202005181552511906386.apk
com.shjs.jzxjz.vivo/九州仙剑传|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20200302/202003021054228210141.apk
com.yzcm.xxsj.vivo/修仙世界|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20200624/202006241643504389947.apk
com.taifeng.tiantu.vivo/天途|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20201111/2020111111561015xkf.apk
com.xianmoji.jundao.vivo/仙魔纪|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20201126/2020112615414443ji7.apk
com.junhai.txd.vivo/天行道|https://gameapk.vivo.com.cn/appstore/developer/soft/20200424/202004240926143484604.apk
com.idreamsky.jzmf.vivo/决战玛法|https://gameapkbddl.vivo.com.cn/appstore/developer/soft/20200814/202008141614516937557.apk
com.sdg.woool.guaji.vivo/传世挂机|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20190411/201904111747598508259.apk
com.game.qianyou.molj.vivo/魔龙诀|https://gameapkbddl.vivo.com.cn/appstore/developer/soft/20201014/202010141220276qt5a.apk
com.game.huangchengcqi.vivo/皇城传奇|https://gameapk.vivo.com.cn/appstore/developer/soft/20200601/202006011847591164920.apk
com.whtt.zzcq.vivo/主宰传奇|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20200108/202001081542347512628.apk
com.snda.sbkcq2.vivo/沙巴克传奇|https://gameapkbddl.vivo.com.cn/appstore/developer/soft/20200622/202006221140177296978.apk
com.sj.sbcq.vivo/双倍传奇|https://gameapktxdl.vivo.com.cn/appstore/developer/soft/20200214/202002141238155814708.apk
com.cqzzdlq.vivo/传奇至尊|https://gameapk.vivo.com.cn/appstore/developer/soft/20191227/20191227164042177531.apk
com.yzcm.cqbz.vivo/完美传奇|https://gameapkbddl.vivo.com.cn/appstore/developer/soft/20201111/202011111458575lhps.apk
com.game.qianyou.skzm.vivo/时空之门|https://gameapk.vivo.com.cn/appstore/developer/soft/20201130/202011301437159gwc7.apk

替换成：

浮生妖绘卷、剑踪情缘、仙神之怒、仙界幻世录、混沌仙魔诀、九州仙剑传、修仙世界、天途、仙魔纪、天行道、决战玛法、传世挂机、魔龙诀、皇城传奇、主宰传奇、沙巴克传奇、双倍传奇、传奇至尊、完美传奇、时空之门、

用途：粘贴到别处，表示已处理的游戏列表

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 11:07:19

附录

附录

下面列出相关参考资料。

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13

参考资料

参考资料

【教程】BeautifulSoup中使用正则表达式去搜索多种可能的关键字 – 在路上

【已解决】VSCode中如何使用正则表达式去替换且被替换中使用分组group

【整理】中国常见的城市的名字

crifan.org，使用署名4.0国际(CC BY 4.0)协议发布 all right reserved，powered by Gitbook最后更新： 2024-09-30 10:19:13