I'm looking for php code to split word from text using regex, preg_match()
, preg_split()
, or any other way.
$textstring="one #two three #four #five";
I need to get #two
,#four
, and #five
saved as array elements.
I'm looking for php code to split word from text using regex, preg_match()
, preg_split()
, or any other way.
$textstring="one #two three #four #five";
I need to get #two
,#four
, and #five
saved as array elements.
Try splitting by this: \b #
preg_split("/\\b #/", $text)