We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
目录文本:
Contents 1 INTRODUCTION AND SCOPE ................................................................................................................ 4 1.1 SUPPORTED FEATURE LIST ..................................................................................................................................5 1.2 STANDARDS COMPLIANCE...................................................................................................................................6
首层:^[1-9]\d* 二层:^[1-9]\d*.\d* 三层:^[1-9]\d*.[1-9]\d*.[1-9]\d*
^[1-9]\d*
^[1-9]\d*.\d*
^[1-9]\d*.[1-9]\d*.[1-9]\d*
The text was updated successfully, but these errors were encountered:
是首层被识别成二层了么? 首层文本能同时匹配当前的首层和二层正则,所以被当成二层了。优化一下正则最后加个空格就能更精确匹配了
Sorry, something went wrong.
@Robin329 正则表达式需要更加精确, 底层逻辑是从高层级的匹配优先级更高, 如果满足的二级的正则表达式, 则目录被归为二级.
英文目录匹配可以参考这组正则:
^\d+\.\s\? ^\d+\.\d+\w?\s? ^\d+\.\d+\.\d+\w?\s? ^\d+\.\d+\.\d+\.\d+\w?\s? ^\d+\.\d+\.\d+\.\d+\.\d+\w?\s? ^\d+\.\d+\.\d+\.\d+\.\d+\.\d+\w?\s?
这组正则支持 正常的英文目录, 以及类似 1.1a 这种额外的标记; 同时支持目录标记与标题贴贴的情况 如 1.1.1balabal
No branches or pull requests
目录文本:
首层:
^[1-9]\d*
二层:
^[1-9]\d*.\d*
三层:
^[1-9]\d*.[1-9]\d*.[1-9]\d*
The text was updated successfully, but these errors were encountered: