Skip to main content
added 261 characters in body
Source Link
NinjaBearMonkey
  • 10.4k
  • 3
  • 37
  • 66

Retina, 62 bytes

[a-z]
abcdefghijklmnopqrstuvwxyz
[A-Z]
ABCDEFGHIJKLMNOPQRSTUVWXYZ

Can probably be improved with transliterate modeThe two short lines are the regex to match. If the input is lowercase (in the range [a-z]), it replaces that character (in this case, that is the entire input) with the lowercase alphabet. The process is similar for uppercase. If it's not a letter, no replacements are made, and it is outputted untouched.

Try it online.

Retina, 62 bytes

[a-z]
abcdefghijklmnopqrstuvwxyz
[A-Z]
ABCDEFGHIJKLMNOPQRSTUVWXYZ

Can probably be improved with transliterate mode. Try it online.

Retina, 62 bytes

[a-z]
abcdefghijklmnopqrstuvwxyz
[A-Z]
ABCDEFGHIJKLMNOPQRSTUVWXYZ

The two short lines are the regex to match. If the input is lowercase (in the range [a-z]), it replaces that character (in this case, that is the entire input) with the lowercase alphabet. The process is similar for uppercase. If it's not a letter, no replacements are made, and it is outputted untouched.

Try it online.

Source Link
NinjaBearMonkey
  • 10.4k
  • 3
  • 37
  • 66

Retina, 62 bytes

[a-z]
abcdefghijklmnopqrstuvwxyz
[A-Z]
ABCDEFGHIJKLMNOPQRSTUVWXYZ

Can probably be improved with transliterate mode. Try it online.