i am working on a social networking application and it have hash tag feature. i want to match all #tags but not #[[123:hashTag:rameez]] . i know reg-ex for both separately how can i do it in a single reg-ex?
Here is an example :
$tweet = "this has a #hashtag a #badhash-tag and a #goodhash_tag";
preg_match_all("/(#\w+)/", $tweet, $matches);
var_dump( $matches );