(Here BusinessA is my variable name)
But it does not do anything
can anyone help me to solve this
2nd my address is stored in a variable BusinessA (I want to get 33186 From this address that will be stored in another variable like zip_code = 33186 )
I want State from this address in another variable (That is it shows output like state = FL)
I want my address till 12204 SW 131ST AVE MIAMI (and stores it in another variable)
Please try these(Assume str is where variable is stored)
Use them in assign
To remove newline characters - str = System.Text.RegularExpressions.Regex.Replace(str,"\s"," ")
Get pin code - pin = System.Text.RegularExpressions.Regex.Match(str,"\d+\s*$").Value
To Get the country we see that always remaining address and country is separated by comma…so first after getting the pincode we can use replace to remove it and then split of comma…and get the first part as address and second part as country
address = str.Replace(pin,"").Trim.Split({","},StringSplitOptions.None)(0) country = str.Replace(pin,"").Trim.Split({","},StringSplitOptions.None)(1)