Clone Case of Replacement String in RegExp Find/Replace in ExtendScript
Looking for thoughts on how to clone case of the first letter in my find/replace script. For example, I search for \b[Aa]ll inclusive. It finds "All inclusive." When found, the replacement text is "inclusive," but I'm not smart enough with regexp or scripting to figure out a way make the first letter of the replacement text upper case.
Was thinking along the lines of getting the first letter of the found text string, determine it's ascii no., then replacing the first letter of the replacement string with it's asci(no) - 32 if uppercase. Sounds easy on paper, but not so much fun trying to script it. I'm guessing their's an easier way. Any thoughts appreciated.
