Pooya1 Active Member Licensed User Mar 4, 2018 #1 Hi I use below pattern for extract latitude and longitude from googlemap url @([0-9]+\.[0-9]+),(\-?[0-9]+\.[0-9]+) This pattern is working in Online Regex tester or event JAVA But in B4x not working Is there any different between languages about regex? My code : Code: Copy If Regex.IsMatch("@([0-9]+\.[0-9]+),(\-?[0-9]+\.[0-9]+)",Data.Get("map")) Then Dim matcher As Matcher matcher = Regex.Matcher("@(\-?[0-9]+\.[0-9]+),(\-?[0-9]+\.[0-9]+)",Data.Get("map")) Log(matcher.GroupCount) End If My sample googlemap url : https://www.google.com/maps/place/J...d=0ahUKEwi53sCfhO7PAhUBWRQKHamtAwwQ_BIIiQEwDg
Hi I use below pattern for extract latitude and longitude from googlemap url @([0-9]+\.[0-9]+),(\-?[0-9]+\.[0-9]+) This pattern is working in Online Regex tester or event JAVA But in B4x not working Is there any different between languages about regex? My code : Code: Copy If Regex.IsMatch("@([0-9]+\.[0-9]+),(\-?[0-9]+\.[0-9]+)",Data.Get("map")) Then Dim matcher As Matcher matcher = Regex.Matcher("@(\-?[0-9]+\.[0-9]+),(\-?[0-9]+\.[0-9]+)",Data.Get("map")) Log(matcher.GroupCount) End If My sample googlemap url : https://www.google.com/maps/place/J...d=0ahUKEwi53sCfhO7PAhUBWRQKHamtAwwQ_BIIiQEwDg
Erel B4X founder Staff member Licensed User Longtime User Mar 5, 2018 #2 You are not using regex correctly. See the tutorial. Upvote 0