Regex: Get Everything After Curly Braces
I got node names from an XML file that contain a namespace: {http://datex2.eu/schema/2/2_0}nodeName From this I would like to trim the namespace, which is in curly braces. So the
Solution 1:
Can be done without regex simply if you assume you want everything after the "}":
Solution 2:
Try this:
s = '{http://datex2.eu/schema/2/2_0}nodeName'
search = re.search('{.*}(.*)',s)
print (search.group(1))
Post a Comment for "Regex: Get Everything After Curly Braces"