Problem
I need to clean inline html styling from a text file
Solution
Just use below powershell line:
Get-Content .\someTextFile.txt | Foreach-Object {$_ -replace 'style=".*?"',""} >>newTextFile.txt
Explanation
In my case I’m making all kind of notes (short one, long ones, even blog posts drafts) in Microsoft Onenote (I will write some post about how to get all bests from this awesome tool). Since Onenote allows for simple formatting (headings, bolding, cursive etc) I very often use it’s built-in styling. Continue reading “Clean inline html styling”