Delete attached images from posts

Having that resulting XML file from the export it’s just a matter of editing it precisely to get rid of the images before importing it on the other site.

Taking Sublime Text for example it’s pretty easy to find and select all occurrences of [caption and add a line break before them for example. Same for the closing tag. Then find and select all occurrences of [caption again and in the menu under “Selection” select “Expand selection to line”. Then hit delete on your keyboard, done.

Maybe you need to separate all occurrences of <![CDATA[[caption (featured images if I’m right) first by replacing them with some custom token to have them excluded by the in-post image search.