Skip to main content
Question

String replace with multiple value result.

  • November 24, 2022
  • 6 replies
  • 408 views

kidega
Contributor
Forum|alt.badge.img+8

Hi,

I have a scenario with a random string test;

"Häradålderön" which my goal is to se the result to "Haradalderon".

Basically replace any [ä, å, ö] with [a, a, o] letter.

 

I guess using regular expression could do it, but I find it tricky since it might be three sequences to search for ä, å, ö. Any ideas appreciated!

6 replies

david_r
Celebrity
  • November 24, 2022

Did you have a look at the StringDiacriticRemover from the Hub? I believe it should do what you're looking for: https://hub.safe.com/publishers/safe-lab/transformers/stringdiacriticremover


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • November 24, 2022

Have you looked at the StringPairReplacer?

image


kidega
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 24, 2022

Did you have a look at the StringDiacriticRemover from the Hub? I believe it should do what you're looking for: https://hub.safe.com/publishers/safe-lab/transformers/stringdiacriticremover

Haven't looked into this yet, thanks for the suggestion!


kidega
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 24, 2022

Have you looked at the StringPairReplacer?

image

Great! This was a very easy solution, thanks!


pradip
Contributor
Forum|alt.badge.img+3
  • Contributor
  • June 29, 2023

kidega
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • July 28, 2023