Skip to main content
Question

String replace with multiple value result.

  • Nov 24, 2022 1:51 PM UTC
  • 6 replies
  • 509 views

kidega
Contributor
Forum|alt.badge.img+9

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
  • Nov 24, 2022 1:57 PM UTC

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
Evangelist
Forum|alt.badge.img+54
  • Evangelist
  • Nov 24, 2022 2:27 PM UTC

Have you looked at the StringPairReplacer?

image


kidega
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • Nov 24, 2022 3:56 PM UTC

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+9
  • Author
  • Contributor
  • Nov 24, 2022 3:56 PM UTC

Have you looked at the StringPairReplacer?

image

Great! This was a very easy solution, thanks!


pradip
Contributor
Forum|alt.badge.img+3
  • Contributor
  • Jun 29, 2023 10:21 AM UTC

kidega
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • Jul 28, 2023 3:53 AM UTC