[問題] 用RE處理書的目錄
輸入資料:
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://www.ptt.cc/bbs/RegExp/M.1458966514.A.954.html
推
03/26 23:03, , 1F
03/26 23:03, 1F
推
05/05 10:26, , 2F
05/05 10:26, 2F
RegExp 近期熱門文章
PTT數位生活區 即時熱門文章