4

I actually use the Field Calculator "replace" formula that works very well but I have some '\' caracters in my field that I cannot replace. ex : '\naninana' and I want to keep only 'naninana'.

1
  • 1
    shouldn't "\n" be a line break?
    – Elio Diaz
    Nov 27, 2017 at 19:42

1 Answer 1

8

If you want to remove a \ in a field, you can escape it as in:

replace(fieldname, '\\', '')

Or if you wanted to remove \n:

replace(fieldname, '\\n', '')
1
  • It works with replace(fieldname, '\\', '') ! Thanks a lot @larsks
    – Cartophyl
    Nov 27, 2017 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.