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)

  • 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 Sep 13 '17 at 14:00
  • @Joseph I'll delete my answer as I had misunderstood the question. Can you then post your comment as an answer? – Martin Hügi Sep 13 '17 at 14:01
  • @MartinHügi - Don't bother ;) – Joseph Sep 13 '17 at 14:02
  • That's very gracious of you! – Martin Hügi Sep 13 '17 at 14:03
2

You can use the following:

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

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.