(?<!href="|">)(https?:\/\/[\w\-\.!~?&=+\*\'(),\/]+)((?!\<\/\a\>).)* 这个正则可以匹配文本中以http开头的链接, 但是不会匹配那些已经被A标签包围的链接. 测试文本: Test, Here\'s an interesting in-house litigation position with JPMorgan Chase in New York I thought you might b…
Given a string s and a list of strings dict, you need to add a closed pair of bold tag <b> and </b> to wrap the substrings in s that exist in dict. If two such substrings overlap, you need to wrap them together by only one pair of closed bold…