Replace | for /

Hi,

I’m trying to find a way to replace the character | with the character /.
I can’t really find my way around RegEx Builder, so happy to understand how that works. If there’s a way to do it with an assign activity that’s fine too.

The string is dynamic and can contain multiple words and characters, it also does not always contain |, but when it does it should be replaced with /

Thanks in advance!

Hello

Take a look at the “Replace” activity.

You might need to use an If activity to check the value is in the string first.

Cheers

Steve

Hi Steve,

Thanks, but could you give me an example of what to put in “pattern” in the Replace activity?

I think I found an easy way to do this:
var_Desc.Replace("|","/").
Is there any occasion where this doesn’t work properly?

1 Like

@JVDS

Check as below

image

If there is another symbols except “|”

Then it will give the same string

Hope this helps you

Thanks

1 Like

Sorry mate

I am travelling…

Glad you got a solution

No worries. Thanks for helping out anyway :slight_smile:

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