2

I have some text in a column in QGIS, I am using field calculator, I need to replace it with some other text.

This is what I have so far:

replace("url", 'Y:\Natural Environment Record\', 'http://www.exmoor-nationalpark.gov.uk/PAttachments//NER/')

It doesn't seem to like this, any ideas? This goes along side the answer to my last query getting spaces removed and to include them as %20 (Réf. Inserting %20 instead of a space as a string)

4
  • That worked again, thanks @Joseph. I then do the replace("url", ' ', '%20') one again and I should have links to my url's. Thanks ever so.
    – Matt Sully
    Commented Sep 13, 2017 at 14:00
  • @Joseph I'll delete my answer as I had misunderstood the question. Can you then post your comment as an answer? Commented Sep 13, 2017 at 14:01
  • @MartinHügi - Don't bother ;)
    – Joseph
    Commented Sep 13, 2017 at 14:02
  • That's very gracious of you! Commented Sep 13, 2017 at 14:03

1 Answer 1

2

You can use the following:

replace("url", 'Y:\\Natural Environment Record\\', 'http://www.exmoor-nationalpark.gov.uk/PAttachments//NER/')
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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