Regex: Escaping pipe character
I am importing my Google Analytics data into the data studio. Now I want to process the label strings into new custom dimensions. The strings contain pipe separators in order to split the different pieces of information. But I am not able to create a working regex syntax that properly escapes the pipe separator.
Here is the REGEX I am using at the moment:
So it basically recognises any string ([a-zA-Z_]*)
Followed by a space ( )
Followed by any character (.)
Instead of this third "any character" I want to have the pipe separator. I can not use it directly (|) because it is the OR-syntax. There are several ways of escaping it according to the RE2 table that is referenced in the Data Studio Help (https://github.com/google/re2/wiki/Syntax). According to the ASCII table it should be possible to escape the pipe either with
But none of the variations worked. I am probably using it wrong, appreciate your help.