In your regex there is a space before the # $mh_regex = "/\ #[a-zA-Z0-9-]+/";
so it would match # tag
instead of #tag
.
It might be a good idea to test your regex using this online tool: http://www.regexr.com/ it’s really usefull for testing
In your regex there is a space before the # $mh_regex = "/\ #[a-zA-Z0-9-]+/";
so it would match # tag
instead of #tag
.
It might be a good idea to test your regex using this online tool: http://www.regexr.com/ it’s really usefull for testing