Skip to main content
added 48 characters in body
Source Link
Xcali
  • 16.2k
  • 2
  • 15
  • 39

Perl 5, 34 3333 29 + 1 (-p) = 3430 bytes

s/.*\K\[(.*[^[]*?)\]](.)/$1x$2/ge&&redoe&&redo

Try it online!Try it online!

Cut it down with some help from @Shaggy and @TonHospel.

Perl 5, 34 33 + 1 (-p) = 34 bytes

s/.*\K\[(.*?)\](.)/$1x$2/ge&&redo

Try it online!

Perl 5, 34 33 29 + 1 (-p) = 30 bytes

s/.([^[]*?)](.)/$1x$2/e&&redo

Try it online!

Cut it down with some help from @Shaggy and @TonHospel.

added 51 characters in body
Source Link
Xcali
  • 16.2k
  • 2
  • 15
  • 39

Perl 5, 3434 33 + 1 (-p) = 3534 bytes

s/.*\K\[(.*?)\](\d.)/$1x$2/ge&&redo

Try it online!Try it online!

Perl 5, 34 + 1 (-p) = 35 bytes

s/.*\K\[(.*?)\](\d)/$1x$2/ge&&redo

Try it online!

Perl 5, 34 33 + 1 (-p) = 34 bytes

s/.*\K\[(.*?)\](.)/$1x$2/ge&&redo

Try it online!

Source Link
Xcali
  • 16.2k
  • 2
  • 15
  • 39

Perl 5, 34 + 1 (-p) = 35 bytes

s/.*\K\[(.*?)\](\d)/$1x$2/ge&&redo

Try it online!