CSS, DIR, Inline Style Stripper

This code uses four regular expressions, one to remove all inline styles, one to remove all "id" elements and another to remove all "dir" elements. It then calls the saveFile() function to save the new HTML file with no classes, inline styles, id or dir elements.

Please be aware that this is still a simple example that could be refined and improved, also it could be improved by using a proper library to parse the HTML and remove the attributes, rather than using regular expressions.