I have to split some string in PostgreSQL on ','
but not on '\,'
(backslash is escape character).
For example, regexp_split_to_array('123,45,67\,89', ???)
must split the string to array {123, 45, "67\,89"}
.
What done already: E'(?<!3),'
works with '3'
as escape character. But how can I use the backslash instead of 3?
Does not work:
E'(?<!\),'
does not split the string at all
E'(?<!\\),'
throws error "parentheses () not balanced"
E'(?<!\ ),'
(with space) splits on all ','
including '\,'
E'(?<!\\ ),'
(with space) splits on all ','
too.