[問題] regexp有and能用嗎?

看板Perl作者 (cralvin)時間17年前 (2008/02/29 01:37), 編輯推噓1(102)
留言3則, 3人參與, 最新討論串1/1
In Perl regular expressions, all characters match themselves except for the followi\ ng special characters: .[{()\*+?|^$ 每個都認得,有or |但沒看到and,是真的沒有 或有其它方式能用? 像找一個同時含有"123" "abc" "xyz"的字串 如果確定出現順序是可以用.*來連接 不確定的情形下呢?找不到and能用 那位大大教一下這情形的regexp用法 thx -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.84.180.51

02/29 01:57, , 1F
easier to do it with 3 regexes: /123/ && /abc/ && /xyz/
02/29 01:57, 1F

02/29 10:32, , 2F
想想如果是NFA或DFA要怎樣做出and的效果 就會知道了
02/29 10:32, 2F

02/29 15:10, , 3F
問題這不是perl程式@@,是用在ultraedit的regexp……
02/29 15:10, 3F
文章代碼(AID): #17nl4zZE (Perl)
文章代碼(AID): #17nl4zZE (Perl)