Dim StringContainingLink As String = "Yesterday i came across a very useful website www.b4x.com and http://www.google.com i wanted to share it with you also you should have a look at https://google.com:5123 to see what is going on."
Dim mPattern As String = "(?:^|[\W])((ht|f)tp(s?):\/\/|www\.)" & "(([\w\-]+\.){1,}?([\w\-.~]+\/?)*" & "[\p{Alnum}.,%_=?&#\-+()\[\]\*$~@!:/{};']*)"
Dim mMatcher As Matcher = Regex.Matcher2(mPattern, Bit.Or(Regex.CASE_INSENSITIVE, Regex.MULTILINE), StringContainingLink)
Do While mMatcher.Find
Dim matchStart As Int = mMatcher.GetStart(1)
Dim matchEnd As Int = mMatcher.GetEnd(0)
Log($"Start: ${matchStart} End: ${matchEnd} String: ${StringContainingLink.SubString2(matchStart, matchEnd)}"$)
Loop