feat: 优化代码

pull/106/head
kunfei 5 years ago
parent 7c9a59db01
commit 974856ffae
  1. 44
      app/src/main/assets/txtTocRule.json

@ -1,38 +1,56 @@
[ [
{ {
"enable": true, "enable": true,
"name": "默认正则1", "name": "数字 分隔符 标题名称",
"rule": "^(.{0,8})(第)([0-9零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,10})([章节卷集部篇回场])(.{0,30})$", "rule": "^[ \\t]{0,4}\\d{1,5}[\\,\\., 、\\-].{1,30}$",
"serialNumber": 0 "serialNumber": 0
}, },
{ {
"enable": true, "enable": true,
"name": "默认正则2", "name": "特殊符号 序号 标题",
"rule": "^([0-9]{1,5})([\\,\\.,-])(.{1,20})$", "rule": "^[ \\t]{0,4}[\\[〈「『〖〔《(【\\(]?[第卷][\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,10}[\\.:: \f\t].{0,30}$",
"serialNumber": 1 "serialNumber": 1
}, },
{ {
"enable": true, "enable": true,
"name": "默认正则3", "name": "特殊符号 标题",
"rule": "^(\\s{0,4})([\\(【《]?(卷)?)([0-9零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,10})([\\.:: \f\t])(.{0,30})$", "rule": "^[ \\t]{0,4}[\\[〈「『〖〔《(【\\(☆★].{1,30}[\\)】)》〕〗』」〉\\]]?\\s{0,4}$",
"serialNumber": 2 "serialNumber": 2
}, },
{ {
"enable": true, "enable": false,
"name": "默认正则4", "name": "特殊符号 标题(不匹配空白字符)",
"rule": "^(\\s{0,4})([\\((【《])(.{0,30})([\\))】》])(\\s{0,2})$", "rule": "(?<=\\s)[\\[〈「『〖〔《(【\\(☆★].{1,30}[\\)】)》〕〗』」〉\\]]?\\s{0,4}$",
"serialNumber": 3 "serialNumber": 3
}, },
{ {
"enable": true, "enable": true,
"name": "默认正则5", "name": "Chapter/Section/Part 序号 标题",
"rule": "^(\\s{0,4})(正文)(.{0,20})$", "rule": "^[ \\t]{0,4}(?:[Cc]hapter|[Ss]ection|[Pp]art)\\s{0,4}\\d{1,4}.{0,30}$",
"serialNumber": 4 "serialNumber": 4
}, },
{ {
"enable": true, "enable": true,
"name": "默认正则6", "name": "正文 标题/序号",
"rule": "^(.{0,4})(Chapter|chapter)(\\s{0,4})([0-9]{1,4})(.{0,30})$", "rule": "^[ \\t]{0,4}正文\\s{1,4}.{0,20}$",
"serialNumber": 5 "serialNumber": 5
},
{
"enable": true,
"name": "目录",
"rule": "^[ \\t]{0,4}(?:(?:内容|文章)?简介|前言|序章|楔子|正文(?!完)|[Cc]hapter|[Ss]ection|终章|后记|尾声|番外|第?\\s{0,4}[\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]+?\\s{0,4}(?:章|节(?!课)|卷|集(?![合和])|部(?!分)|篇(?!张))).{0,30}$",
"serialNumber": 6
},
{
"enable": false,
"name": "目录(不匹配行前空白,正文不出现双标题)",
"rule": "^(?<=\\s)(?:(?:内容|文章)?简介|前言|序章|楔子|正文(?!完)|[Cc]hapter|[Ss]ection|终章|后记|尾声|番外|第?\\s{0,4}[\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]+?\\s{0,4}(?:章|节(?!课)|卷|集(?![合和])|部(?!分)|篇(?!张))).{0,30}$",
"serialNumber": 7
},
{
"enable": false,
"name": "目录(古典小说备用)",
"rule": "^[ \\t]{0,4}(?:(?:内容|文章)?简介|前言|序章|楔子|正文(?!完)|[Cc]hapter|[Ss]ection|终章|后记|尾声|番外|第?\\s{0,4}[\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]+?\\s{0,4}(?:章|节(?!课)|卷|集(?![合和])|部(?!分)|场(?![和合比电是])|篇(?!张))).{0,30}$",
"serialNumber": 8
} }
] ]
Loading…
Cancel
Save