diff --git a/core/node_strings.go b/core/node_strings.go index d6e09d3..b2a397c 100644 --- a/core/node_strings.go +++ b/core/node_strings.go @@ -172,3 +172,7 @@ func (sender *Strings) ReplaceEmojis(str string, f func([]string) string) string func (sender *Strings) ReplaceToEmojis(str string, pattern string) string { return emoji.ReplaceToEmojis(str, pattern) } + +func (sender *Strings) ExtractAddress(input string) string { + return regexp.MustCompile(`http[s]?://[\w.]+:\d*`).FindString(input) +}