i have following regexp using iwth the preg_split function:
$data = "Well this is a test an i would go to http://www.google.de if i would be you !";
$a = preg_split("(http://(www.)?[a-z]{2,}.([a-z]{2,3})+)","$data");
print_r($a);
everything works (regexp) as i wanted it to. But using preg_split "cuts the pattern out of the string" and return an array with the strings around the pattern.
how could i achive that every matched pattern is returned in that array ? is this possible to obvert the "default" use of this function ?
would be great if someone could help me. For example the way i wanted it to be $a[0] should return http://www.google.de
thanks in advance
ali