From 4330a22a5ff02f93a798dc57fb85220de804e3a9 Mon Sep 17 00:00:00 2001 From: cdle Date: Mon, 5 Jun 2023 16:29:06 +0800 Subject: [PATCH] x --- core/node_strings.go | 4 ++++ 1 file changed, 4 insertions(+) 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) +}