作者winer5482 (Klutz)
看板RegExp
标题[问题] 一个关於sql里的regex问题
时间Sat Oct 26 10:38:00 2019
/*
听说注明使用的语言、环境
*
问题有可能较容易被解决...
*/
请问各位,若我今天在资料库sql里,
有些资料是 xxx.txt_xxx.zip
有些则是 xxx.zip_xxx.zip
有些只有 xxx.zip
请问我该如何写regex,只要xxx.zip就好,其他两种都不要呢?
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 114.136.128.26 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/RegExp/M.1572057482.A.D69.html
1F:→ adrianshum: 不要让人猜你的规则好吗?谁知道你是不想要底线还是 10/31 09:01
2F:→ adrianshum: 不想要点还是不想要zip 或txt? 10/31 09:01
3F:→ adrianshum: 看看negative lookahead 合不合用吧 10/31 09:04