How search and replace with Textwrangler xml tag ? with grep?

860 Views Asked by At

For example, i try to search and delete in an XML file all node wp:postmeta who has different content

    <wp:postmeta>
        <wp:meta_key>_edit_last</wp:meta_key>
        <wp:meta_value><![CDATA[2]]></wp:meta_value>
    </wp:postmeta>

I'll try first something like : <wp:postmeta>*</wp:postmeta> thinking that it will return all the node. But it doesn't work. What is the methodology for that sort of search ? Thx

1

There are 1 best solutions below

4
On BEST ANSWER
<wp:postmeta>[\s\S]*?</wp:postmeta>

Try this.See demo.

http://regex101.com/r/sA8iT4/2