I am trying to extract all substrings in a string that is between the strings /* and */. I know this will probably need to be done with regular expressions however I'm having a hard time getting the correct regex since the star character is actually used to symbolise repeated characters. I'm am trying to use the preg-match method in PHP here is what I have come up with so far but I'm not having much luck.
<?php
$aString = "abcdef/*ghij*/klmn/*opqrs*/tuvwxyz";
preg_match("/*/.*/", $aString, $anArray);
for ($i = 0; $i < count($anArray); i++)
echo $anArray[i] . "\n";
?>