作者pinkisme ()
看板RegExp
标题[问题] 请问字串撷取的方式
时间Wed Nov 21 02:21:31 2007
因为是用php开发,想请问一下
比方说有一个字串
$string = "this is an apple!"
而我想要取出字串分别是this,is,an,apple
那他的reg exp应该怎样表示呢?
实在想不太出来该怎样去做,麻烦各位了@@
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.115.156.75
2F:推 aoc90058:$string = "this is an apple!"; 11/21 03:16
3F:→ aoc90058:$pattern = "([a-zA-Z]+)"; 11/21 03:16
4F:→ aoc90058:preg_match_all($pattern,$string,$a); 11/21 03:17
5F:推 pinkisme:感谢各位的回答 @@" 11/21 04:07