Search and Replace "Inline Styling" to remove large chunks that are not the same


I would really like to be able to search and replace different types of inline attributes. For example. If there are 200 lines of code that all have inline styling on them and I want to remove all of the styling, how would I do that? If all the styles are not the same I can’t just do a “replace all”. I need a way to say “find all instances of ‘style’ and remove all the contents from that element”. I am assuming there is already a way to do this but i have no idea how. Thanks.


I assume you’re talking about HTML code here? I don’t think I have an answer to your question but I wasn’t entirely clear on the situation you’re describing, so I thought I would ask.


I am referring to HTML but technically whatever the solution is should be useful for other languages. I use to be able to do it in Dreamweaver. As bulky as DW was it had a lot of useful shortcuts and functionality. I wanted to try Atom and I like it but I miss the ability to find and replace all instances of a specific attribute essentially.


Find and replace has a regex option (the button to the right with .* in it). You can search for something like style="[^"]*" and replace it with an empty string, and voila, your styles should be gone :slight_smile: