David Martinez Member Licensed User Longtime User Apr 21, 2017 #1 I am trying to strip out the spaces from the returned Contact number. I tried: Code: Regex.Replace(" ", strTempPhone, "") and this does not do it. I found this article but it did not help: http://stackoverflow.com/questions/19743883/ios-7-contact-number-spaces-are-not-spaces Any help would be appreciated...thanks.
I am trying to strip out the spaces from the returned Contact number. I tried: Code: Regex.Replace(" ", strTempPhone, "") and this does not do it. I found this article but it did not help: http://stackoverflow.com/questions/19743883/ios-7-contact-number-spaces-are-not-spaces Any help would be appreciated...thanks.
Erel B4X founder Staff member Licensed User Longtime User Apr 23, 2017 #2 Your code doesn't do anything. It should be: Code: strTempPhone = strTempPhone.Replace(" ", "") Upvote 0
David Martinez Member Licensed User Longtime User Apr 24, 2017 #3 The actual line of code was: Code: strTempPhone = Regex.Replace(" ", strTempPhone, "") I just posted the method. This code was working fine in the B4A version of my application but not in B4i so it seems to be specific to IOS Contact spaces. Anyway, your code seems to work fine...thanks! Upvote 0
The actual line of code was: Code: strTempPhone = Regex.Replace(" ", strTempPhone, "") I just posted the method. This code was working fine in the B4A version of my application but not in B4i so it seems to be specific to IOS Contact spaces. Anyway, your code seems to work fine...thanks!
David Martinez Member Licensed User Longtime User May 4, 2017 #4 This issue seems to have returned again. I thought it may be just the real phone but the simulator is doing it as well. Both Regex and string replace methods do not remove the space between the parentheses and the number ie. (323)<here>333-9876. This issue seems to be erratic. The answer below seems to work for people but I don't know how to implement it... http://stackoverflow.com/questions/...e-from-contact-number-fetched-from-phone-book Last edited: May 4, 2017 Upvote 0
This issue seems to have returned again. I thought it may be just the real phone but the simulator is doing it as well. Both Regex and string replace methods do not remove the space between the parentheses and the number ie. (323)<here>333-9876. This issue seems to be erratic. The answer below seems to work for people but I don't know how to implement it... http://stackoverflow.com/questions/...e-from-contact-number-fetched-from-phone-book
Erel B4X founder Staff member Licensed User Longtime User May 5, 2017 #5 Try this: Code: strTempPhone = Regex.Replace("\s", strTempPhone, "") Upvote 0
David Martinez Member Licensed User Longtime User May 5, 2017 #6 That seems to work well. Thanks for your help! Upvote 0