For a string like asdftheremainderhere
, what is a simple way to split the string to asdf
and theremainderhere
using a regex to match asdf
?
I tried using:
preg_match('/asdf|ghik/', 'asdftheremainderhere', $matches);`
But only asdf
is the only element of $matches
.