extract every occurrence on string

Posted by Dan on Stack Overflow See other posts from Stack Overflow or by Dan
Published on 2010-05-04T16:08:15Z Indexed on 2010/05/04 16:18 UTC
Read the original article Hit count: 159

Filed under:
|

I have a string of the form "a-b""c-d""e-f"... Using preg_match, how could I extract them and get an array as:

Array
(
    [0] =>a-b
    [1] =>c-d
    [2] =>e-f
    ...
    [n-times] =>xx-zz
)

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about preg-match