From: <ek...@di...> - 2020-12-27 02:38:33
|
Suppose I had two classes uppercase = codepoint("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); lowercase = codepoint("abcdefghijklmnopqrstuvwxyz"); and I wanted to convert every uppercase letter to a "S" if it's preceded by the corresponding lowercase letter (so "bB" becomes "bS", "fF" becomes "fS", but "cD" stays as "cD"), how would I do that? Doing `lowercase uppercase > @1 U+0053` doesn't work because then any combination of lowercase and uppercase becomes lowercase + S including "cD" becoming "cS" (and I only want the corresponding uppercase to match) Doing `uppercase > U+0053 / lowercase _;` doesn't work either for the same reason. I can't figure it out. Can anyone please help me out? |