Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[懒人包]章节, 分节, 小节的正则表达式的提供 #10

Open
Larry-Liang opened this issue Aug 24, 2022 · 2 comments
Open

[懒人包]章节, 分节, 小节的正则表达式的提供 #10

Larry-Liang opened this issue Aug 24, 2022 · 2 comments

Comments

@Larry-Liang
Copy link

首层: "^第-?[1-9]\d章"
二层: "^[1-9]\d
.\d*"
三层: "^[1-9]\d*.[1-9]\d*.[1-9]\d*"

使用建议:

  1. 先将目录的文本放到编辑器, 把"第"后面和"章"前面多余的空格去掉;
  2. 留意目录标题最后是不是数字, 如果是数字, 则需把最后的数字和页码空格分开(如: 1.4.1 计算机历史1900~202281)
@chroming
Copy link
Owner

感谢分享~

@Larry-Liang
Copy link
Author

首层的表达式转义了, ^第[1-9]\d*章 才对

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants