0

I have this dataset I got it from Wikimapia ,containing bunch of fields . One of fields named "PopupInfo" contains xml tags :

enter image description here

and looks like this when in editing mode :

enter image description here

I want to remove these tags and keep the text between them . is there tool or script can do this .

  • Don't forget to mark a response as answered if it provides a solution for you. – jon_two Mar 3 '16 at 12:51
3

You can use the Field Calculator to do a regex substitution on the PopupInfo field, like this:

Field Calculator Dialog

The pre-logic function is:

import re

def RemoveTags(MyString):
    return re.sub('<.*?>', '',  MyString)

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.