Quick tip: replace it (slightly) smarter.

I try to use regular expression as much as I can. Mainly because this gets really “rusty” very quickly when not used. What I like to use very often is PowerShell’s operator –replace. It works wonders, especially when combined with named and numbered captures. But there are situations where this syntax can be hard to apply. I was walking around those issues in the past until I finally came up with solution that seems obvious if you think of it for a minute – so I’m probably not the first one that came up with it. If you did it few years ago – please feel free to look down on me. Puszczam oczko

Continue reading