Replace character in middle of string

Hi everyone!
How can I replace the specified character in a string?
For example, there is a string “23456055156”. I want to replace 055 with + -.
Input data 23456055156, output data “23456 + -156”. The length of the string is different each time and “055” will be after the middle.
I added regular expressions: ^ 055 or 055 $, but they only remove at the beginning and end of the line.
Help me please.

1 Like

Hey @sereganator,

Please find the quick solve below.

If you want more help, please let me know

Cheers :slight_smile:

Your method replaces all “055” with + -, and you need to replace only after the middle. For example, input 055122456055223, output 055122456 + - 223. At the beginning we leave “055”, after the middle - we replace it.

@sereganator

Is there any specific length to the Beginning and total digits?

How you identify that it is middle of the string or not?

Thanks

There is no specific length, the main thing is not to delete the character at the beginning and at the end of the line.

Hey @sereganator… Interesting one…

As per all your requirements, I’ve tried to create one model have a look hope this will meets your requirement.

String - Insert.xaml (6.9 KB)

Hey @sereganator,

Sorry missed that part. Now I have upgraded the same workflow. PFB

Also, Attached the file for your ref - stringMan.zip (2.2 KB)

Cheers :slight_smile:

1 Like

Thank you very much!)

1 Like

Thank you!)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.