Sub Process_Globals
Private fx As JFX
Private MainForm As Form
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
Dim StringContainingLink As String = "Yesterday i came across a very useful website https://www.facebook.com/profile.php?id=100011525702168 and i wanted to share it with you, btw you should also check this one www.b4x.com and also http://www.sagital.net"
mindful(StringContainingLink)
End Sub
Sub mindful(url As String)
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), url)
Do While mMatcher.Find
Dim matchStart As Int = mMatcher.GetStart(1)
Dim matchEnd As Int = mMatcher.GetEnd(0)
Log(url.SubString2(matchStart, matchEnd))
Loop
End Sub