I have an html text and I have to delete all styles on it, for example:
let myString= "<div style='color: red;'>Hello world</div><p>Some text here</p><div style='border: 0px;'>hello world 2!</div>";
In this text I want to delete all occurrences that start with style=' and finish on ', so I'm removinig all styles from my text, so any word could between style= and ' how would be the regex for this.
let formatedString = myString.replace(regexHere, '');
The result should be:
<div>Hello world</div><p>Some text here</p><div>hello world 2!</div>
Why is not duplicate: The suggested post is about tags, mine is about "params" inside a tag, so for a regex's newbie (like me) is different.