作者chrisdar ()
看板RegExp
标题[问题] 用RE处理书的目录
时间Sat Mar 26 12:28:31 2016
输入资料:
5.2 Initializing the I/O Base Registers ................................. 51
5.3 Hiding and Function Disable troller Hub (PCH) Internal Devices 52
5.3.1 Fuse Disabled, Static Disabled, Non-Static Function Disable Device
Handling ................................................................. 53
8.4 SERR# Generation .................................................. 102
8.5 PCI Firmware Spec 3.0 Support ..................................... 103
8.6 ACPI Table and Methods for PCI Express* Support ................... 103
RE字串: ^([\d\.]+)\s*([^.]+)
目前错误:
5.3 标题抓到下一行的5
8.5 标题抓到 3就停了
请问有没有更好的 RE 字串? 目前用 Ultrapico Expresso 实验
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 180.176.179.51
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/RegExp/M.1458966514.A.954.html
1F:推 No: ^([\d\.]+)\s+(.+?)\.*\s+\d+$ 03/26 23:03