精華區beta RegExp 關於我們 聯絡資訊
因為是用php開發,想請問一下 比方說有一個字串 $string = "this is an apple!" 而我想要取出字串分別是this,is,an,apple 那他的reg exp應該怎樣表示呢? 實在想不太出來該怎樣去做,麻煩各位了@@ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.156.75
LPH66:連regexp都不用: http://tw.php.net/explode 11/21 03:10
aoc90058:$string = "this is an apple!"; 11/21 03:16
aoc90058:$pattern = "([a-zA-Z]+)"; 11/21 03:16
aoc90058:preg_match_all($pattern,$string,$a); 11/21 03:17
pinkisme:感謝各位的回答 @@" 11/21 04:07