I have imported some blog posts from an external site and there were unnecessary html tags and values I wanted to get rid of like the sizes and srcset including their values for all blog posts. It goes something like this:
<img src="/wp-content/uploads/2024/12/AHG-guitar-blond-girl-Pixabay-1024x683.jpg" sizes="(max-width: 1024px) 100vw, 1024px" srcset="/wp-content/uploads/2024/12/AHG-guitar-blond-girl-Pixabay-1024x683.jpg 1024w, /wp-content/uploads/2024/12/AHG-guitar-blond-girl-Pixabay-300x200.jpg 300w, /wp-content/uploads/2024/12/AHG-guitar-blond-girl-Pixabay-768x512.jpg 768w, /wp-content/uploads/2024/12/AHG-guitar-blond-girl-Pixabay-1536x1025.jpg 1536w, /wp-content/uploads/2024/12/AHG-guitar-blond-girl-Pixabay.jpg 1919w" alt="" width="1024" height="683" />
I'm using WP Migrate DB Pro Find and Replace feature and have tried regex combinations below but nothing seems to work.
<img[^>]+srcset="([^">]+)" and <img[^>]+sizes="([^">]+)"
Appreciate any help. Thanks