I'd like to use PHP's preg_match_all
function to split a string by a certain caracter, while the 'certain character' is the first character in the string, e.g.:
$pattern = '/#(?P<word>[.....])';
$string = 'one#two#three';
$matches = array();
preg_match_all($pattern,$string, $matches);
// expected $matches array: $matches['word'] = 'one','two','three'
So the "split field character" is itself part of the pattern (the first char).
Is this even possible? if yes, how?