PowerShell – Case-insensitive String Replacement

The problem: Replace "a" with "b" case-insensitively You have a simple string and you want to replace all "a" with "b" in a case-insensitive manner. First attempt (fail): PS C:\Windows\system32> [string] $someString = 'aAaAaAaA' $SomeString.Replace('a', 'b') #Result bAbAbAbAbA What happened? The [string].Replace() method is case-sensitive Second attempt (looks like it works but not quite): PS … Continue reading PowerShell – Case-insensitive String Replacement


Hard-coding Values In SQL Code – Please Don’t

What is hard-coding? Wikipedia defines it as below Hard coding (also, hard-coding or hardcoding) refers to the software development practice of embedding what may, perhaps only in retrospect, be regarded as input or configuration data directly into the source code of a program or other executable object, or fixed formatting of the data, instead of … Continue reading Hard-coding Values In SQL Code – Please Don’t