문제

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

도움이 되었습니까?

해결책

To eliminate the GUID from each tag, find

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

and replace it with nothing.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top