我正在尝试使用正则表达式来捕获部分标题,但是为什么我能够用它捕获“4.1 General”,但是如果我在正则表达式的末尾添加换行符,\n([\d\.]+ ?\w+)\n
它不再捕获该行?后面没有换行还是我遗漏了什么?
\n([\d\.]+ ?\w+)
输入
3.6.10
POLLUTION DEGREE 4
continuous conductivity occurs due to conductive dust, rain or other wet conditions
3.6.11
CLEARANCE
shortest distance in air between two conductive parts
3.6.12
CREEPAGE DISTANCE
shortest distance along the surface of a solid insulating material between two conductive
parts
4 Tests
4.1 General
Tests in this standard are TYPE TESTS to be carried out on samples of equipment or parts.
\n([\d\.]+ ?\w+)\n? 似乎也不起作用。
米脂
相关分类