I am looking for a method to remove a varying set of numbers from a string.
I have multiple images that have a style="" tag that I want to remove when rendering for an API.
i.e.
< img src="https://IMAGE.jpg" style="width: 1398px;" data-status="ok">
< img src="https://IMAGE.jpg" style="width: 1393px;" data-status="ok">
< img src="https://IMAGE.jpg" style="width: 1385px;" data-status="ok">
I want to remove the style="" tag and I am looking for a gsub or regex method to do this.
Something along the lines.
.gsub('style="width: ****px;"', '')
Where the **** is a solution to any number 0..9 for each digit?