1

I could not find a good way to replace a string using regular expression in swift. My web service returns string which may contain multiple unicode characters like in the string

V̇E TOT

How can we replace the string "̇" with "\u{0307}" to display on a iOS label.

  • @rmaddy: The answer helped me to properly handle unicode characters display. But in general I was looking for a good way to find a replace using regular expressions in swift. – Shashidhar Yamsani Nov 05 '18 at 17:23
  • Why would you use a regular expression? – rmaddy Nov 05 '18 at 17:25
  • @rmaddy: As an example replacing matching curly braces with square braces using regular expression. ex. convert from {abc} xyz} {uvw} to [abc] xyz} [uvw] – Shashidhar Yamsani Nov 05 '18 at 21:34
  • That's a completely different question than what you originally posted here. If you have a new question, post a new question with all relevant details. Make sure you include your attempts. – rmaddy Nov 05 '18 at 21:38

0 Answers0