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 302 characters in body
Source Link
Neil
  • 184.4k
  • 12
  • 76
  • 290

Retina, 78(削除) 78 (削除ここまで) 69 bytes

T`dl`9-0uzT`b-x\owdf-vtishj-pnemmaed\oup-j\hagfdtv-bz`Ro
/[aeiou]/{*>0L`.*?[aeiou]
0`.*?[aeiou]
V`

Try it online! Try it online! Link includes test cases. Explanation:

T`dl`9-0uzT`b-x\owdf-vtishj-pnemmaed\oup-j\hagfdtv-bz`Ro

Swap each character with its equivalent. The Ro causes the string to transliterate to its reverse. The middle consonant n and vowel i map to themselves so don't need to be listed. The first 10 consonants are listed first and the last 10 last so that they transliterate to each other. The first and last two vowels then surround the digits. (The o is normally special so it has to be quoted here.)

/[aeiou]/{

Repeat while a vowel remains.

*>0L`.*?[aeiou]

Output the text up to the vowel.

0`.*?[aeiou]

Delete the text up to the vowel.

V`

Reverse the remaining text. When there are no vowels left, this is then implicitly output, however for the purposes of the test cases, the header outputs the text at the end of each line.

Retina, 78 bytes

T`dl`9-0uz-x\ow-vtis-pnem-j\hagfd-b
/[aeiou]/{*>0L`.*?[aeiou]
0`.*?[aeiou]
V`

Try it online! Link includes test cases. Explanation:

T`dl`9-0uz-x\ow-vtis-pnem-j\hagfd-b

Swap each character with its equivalent.

/[aeiou]/{

Repeat while a vowel remains.

*>0L`.*?[aeiou]

Output the text up to the vowel.

0`.*?[aeiou]

Delete the text up to the vowel.

V`

Reverse the remaining text. When there are no vowels left, this is then implicitly output, however for the purposes of the test cases, the header outputs the text at the end of each line.

Retina, (削除) 78 (削除ここまで) 69 bytes

T`b-df-hj-maed\oup-tv-z`Ro
/[aeiou]/{*>0L`.*?[aeiou]
0`.*?[aeiou]
V`

Try it online! Link includes test cases. Explanation:

T`b-df-hj-maed\oup-tv-z`Ro

Swap each character with its equivalent. The Ro causes the string to transliterate to its reverse. The middle consonant n and vowel i map to themselves so don't need to be listed. The first 10 consonants are listed first and the last 10 last so that they transliterate to each other. The first and last two vowels then surround the digits. (The o is normally special so it has to be quoted here.)

/[aeiou]/{

Repeat while a vowel remains.

*>0L`.*?[aeiou]

Output the text up to the vowel.

0`.*?[aeiou]

Delete the text up to the vowel.

V`

Reverse the remaining text. When there are no vowels left, this is then implicitly output, however for the purposes of the test cases, the header outputs the text at the end of each line.

Source Link
Neil
  • 184.4k
  • 12
  • 76
  • 290

Retina, 78 bytes

T`dl`9-0uz-x\ow-vtis-pnem-j\hagfd-b
/[aeiou]/{*>0L`.*?[aeiou]
0`.*?[aeiou]
V`

Try it online! Link includes test cases. Explanation:

T`dl`9-0uz-x\ow-vtis-pnem-j\hagfd-b

Swap each character with its equivalent.

/[aeiou]/{

Repeat while a vowel remains.

*>0L`.*?[aeiou]

Output the text up to the vowel.

0`.*?[aeiou]

Delete the text up to the vowel.

V`

Reverse the remaining text. When there are no vowels left, this is then implicitly output, however for the purposes of the test cases, the header outputs the text at the end of each line.

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