作者vernc (cralvin)
看板Perl
標題[問題] 有and能用嗎?
時間Fri Feb 29 01:37:00 2008
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
→ gugod:easier to do it with 3 regexes: /123/ && /abc/ && /xyz/ 02/29 01:57
推 LiloHuang:想想如果是NFA或DFA要怎樣做出and的效果 就會知道了 02/29 10:32
→ vernc:問題這不是perl程式@@,是用在ultraedit的regexp…… 02/29 15:10