Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
added 35 characters in body
Source Link
Grimmy
  • 15.8k
  • 1
  • 36
  • 64

Perl 5, 81 7272 71 bytes

-1 byte thanks to Xcali!

s![aeiouy]+(.)\K.*!($1=~y/bcdfgkpstvzbdfgpstvzck/pgtvkgbzdfsptvkbzdfsg/r.$&x/[aeiouy]/g)x2!ge

Try it online!Try it online!

Perl 5, 81 72 bytes

s![aeiouy]+(.)\K.*!($1=~y/bcdfgkpstvz/pgtvkgbzdfs/r.$&x/[aeiouy]/g)x2!ge

Try it online!

Perl 5, 81 72 71 bytes

-1 byte thanks to Xcali!

s![aeiouy]+(.)\K.*!($1=~y/bdfgpstvzck/ptvkbzdfsg/r.$&x/[aeiouy]/g)x2!ge

Try it online!

added 230 characters in body
Source Link
Grimmy
  • 15.8k
  • 1
  • 36
  • 64

Perl, 81 bytes

s![aeiouy]+(.)\K.*!$^=$1=~y/bcdfgkpstvz/pgtvkgbzdfs/r;/[aeiouy]/g;"$^$&$^$&"!ge

Perl 5, 81 72 bytes

s![aeiouy]+(.)\K.*!($1=~y/bcdfgkpstvz/pgtvkgbzdfs/r.$&x/[aeiouy]/g)x2!ge

Run with perl -pe. Assumes the input is all lowercase.Try it online!

Perl, 81 bytes

s![aeiouy]+(.)\K.*!$^=$1=~y/bcdfgkpstvz/pgtvkgbzdfs/r;/[aeiouy]/g;"$^$&$^$&"!ge

Run with perl -pe. Assumes the input is all lowercase.

Perl 5, 81 72 bytes

s![aeiouy]+(.)\K.*!($1=~y/bcdfgkpstvz/pgtvkgbzdfs/r.$&x/[aeiouy]/g)x2!ge

Try it online!

Source Link
Grimmy
  • 15.8k
  • 1
  • 36
  • 64

Perl, 81 bytes

s![aeiouy]+(.)\K.*!$^=$1=~y/bcdfgkpstvz/pgtvkgbzdfs/r;/[aeiouy]/g;"$^$&$^$&"!ge

Run with perl -pe. Assumes the input is all lowercase.