Uppercase first letter in a string usinf RegEx. You can capitalize the first letter of a string by using RegEx also. The following program shows how to change the first letter of a string to upper case using RegEx. The following function change the first letter to capital using RegEx.