You are here

function hashtags_get_tags in Hashtags 7.2

Same name and namespace in other branches
  1. 6.2 hashtags.module \hashtags_get_tags()
  2. 6 hashtags.module \hashtags_get_tags()
1 call to hashtags_get_tags()
hashtags_node_presave in ./hashtags.module
Implementation of hook_node_presave().

File

./hashtags.module, line 187

Code

function hashtags_get_tags($text) {
  $tags_list = array();
  $pattern = "/#[0-9A-Za-z_]+/";
  preg_match_all($pattern, $text, $tags_list);
  $result = array_unique($tags_list[0]);
  return $result;
}