作者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://webptt.com/cn.aspx?n=bbs/RegExp/M.1647609672.A.F75.html
1F:→ microloft: 「([^」]*)」 03/18 23:37
2F:→ microloft: 用 single line flag (s) 也能让 . match 换行 03/18 23:39
3F:→ skybrest: 推 06/27 21:24