Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 749 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, 35 bytes

Port of Arnauld's JS solution.

r"%)%d?.|%(%w\{0,3}."Ȥ?XÅn36 d:XÌu

Try it Try it (includes all test cases)

r"..."Ȥ?XÅn36 d:XÌu :Implicit input of string
r :Replace
 "..." : RegEx /\)\d?.|\(\w{0,3}./g
 È : Pass each match, X, through the following fuction
 ¤ : Slice off the first 2 characters
 ? : If truthy (non-empty string)
 XÅ : Slice off the first character
 n36 : Convert from base 36
 d : Get character at that codepoint
 : : Else
 XÌ : Last character
 u : Uppercase

Japt, 35 bytes

Port of Arnauld's JS solution.

r"%)%d?.|%(%w\{0,3}."Ȥ?XÅn36 d:XÌu

Try it

Japt, 35 bytes

Port of Arnauld's JS solution.

r"%)%d?.|%(%w\{0,3}."Ȥ?XÅn36 d:XÌu

Try it (includes all test cases)

r"..."Ȥ?XÅn36 d:XÌu :Implicit input of string
r :Replace
 "..." : RegEx /\)\d?.|\(\w{0,3}./g
 È : Pass each match, X, through the following fuction
 ¤ : Slice off the first 2 characters
 ? : If truthy (non-empty string)
 XÅ : Slice off the first character
 n36 : Convert from base 36
 d : Get character at that codepoint
 : : Else
 XÌ : Last character
 u : Uppercase
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, 35 bytes

Port of Arnauld's JS solution.

r"%)%d?.|%(%w\{0,3}."Ȥ?XÅn36 d:XÌu

Try it

AltStyle によって変換されたページ (->オリジナル) /