作者sky91302018 (sky)
看板RegExp
標題[問題] 文章換行與空白行抓取問題
時間Fri Mar 18 21:21:09 2022
Regex規則:「(.*)」
文章:
「Hello World」
「 test
test
test」
regex101:
https://regex101.com/r/pAC4Vz/1
我想要抓取的是文章中「」的內文,不過內文有換行與空白行,導致我抓取不成功,
想請問版上各位是否有方法能夠指導一下呢,謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.34.184.222 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/RegExp/M.1647609672.A.F75.html
→ microloft: 「([^」]*)」 03/18 23:37
→ microloft: 用 single line flag (s) 也能讓 . match 換行 03/18 23:39
→ skybrest: 推 06/27 21:24