Question

I have an XML data file with some irrelevant information. I want to use textmate to replace some of those nodes e.g. GUID=''and ZIPcode=''. Now these nodes have values within them which is different for each parent node.

e.g. XML FILE:

<parent>
   <customer firstName='blah' GUID='2131231j2n3123kj12n3123jkn' ZIPcode='r232 1232'>
   <customer firstName='superblah' GUID='asdasd12312312312312312' ZIPcode='213213'>
   <customer firstName='supersuperBlah' GUID='afasfasf213goi123io123123' ZIPcode='1232'>
</parent>

I am trying to use replace some of the nodes with different values within the parent node using regex. Is that possible?

Example of what i want to achieve:

FIND: GUID='(*any value*)'

REPLACE: (empty)

thanks in advance

Was it helpful?

Solution

To eliminate the GUID from each tag, find

\bGUID='[^']+'<PUT_A_SPACE_HERE>

and replace it with nothing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top