- preg_match: documentation ( source)
- print_r: documentation ( source)
<?php
$str = "Auto Rickshaw/Cab complaints a click away http://t.co/MDsyVes5W2 via @traffline Cc Plz Share @roshanabbas @Netra @GulPanag Thanks";
preg_match("/(@w+)?/", $str,$matches);
print_r($matches);
echo "\n";
preg_match("/(\w*)/", "",$matches);
print_r($matches);