What am I doing wrong?. Please note that it doesn't work in B4J or I can't find the right way to write the RegEx pattern
What I need:
B4A, regex works perfectly
This woks!:
Dim regexHostInfo As String = "PING ([^ ]+) \(([^)]+)\) "
Dim matchHost As Matcher = Regex.Matcher(regexHostInfo, "PING google.com (216.58.202.78) 56(84) bytes of data.")
If matchHost.Find Then
'Hello match!
End If
B4J, regex not found
Not working:
Dim regexHostInfo As String = "Haciendo ping a ([^ ]+) [([^)]+)].*"
Dim matchHost As Matcher = Regex.Matcher(regexHostInfo, "Haciendo ping a www.google.com.ar [172.217.173.227] con 32 bytes de datos:")
If matchHost.Find Then
'Hello match!
End If
Well, I learned it today and I will in the future.
1. Don't republish libraries associated with other posts (Erel told me this)
2. The post is from B4?, in the forum with the problem.