📖

使用正则表达式

💡
Notion Tip: Use this page to describe your approach to interviewing product candidates.
 
match := regexp.MustCompile(`(:[0-9]+)`)
matchPort := match.FindString("http://localhost:8080/test")
// matchPort :8080