Escape a Backslash

Is there a Way to escape a Backslash in a Formula?
What I Want:
Concatenate("\\",“somestring”) ⤑ “\somestring”

What Happens:
Concatenate("\\",“somestring”) ⤑ “\\somestring”

I Found a Workaround:

But is there a nicer way?

Hi @Stephan_Graf ,
It is not entirely clear to me what is your need.

Anyway, you can even try with Format()
Format("\{1}", "somestring")
or even

If you don’t have variables.

Did I get your point…? :thinking:

Hello @Stephan_Graf ,

“” does indeed not work as expected, although I get a different result, not the “****”.

You can try: Concatenate(char(92),"string") which gives you the expected result: \string

Hi Federico

Yes my need was to put a backslash before some word. So you workaround does the trick. Also I learned a new formula: format. So thanks for that! :slight_smile:
I still wonder tgough if there is a way to write/escape a backslash in a string.

but for now this works thanks.

1 Like

Hi joost
thanks for the reply.
I just now sawt that my code got misformatted by the forum. now its correct.
also thanks for the workaround.