Skip to main content
added 12 characters in body
Source Link

PowerShell, 92 bytes

I think there's definitely some room for optimization here; A lot of the bytes are just there to handle the cases with the leading "\d "

$t=1;-split$args|%{$t*=$_-replace'\(','+('-creplace'[A-Z][a-z]*','+1'-replace'_','*'|iex};$t

Try it online!

Honorary Mention, PowerShell, 9999 92 bytes

This was my first solution, and I really liked it. Including it here because I think it's fun.

$o="'-creplace'";"'$args$o^','`$n=$o=\d'creplace'";"'$args$o^(\d)(.*)','`$0;`$n*=$o\'`$1*(`$2)$o\(','+($o[A-Z][a-z]*','+1$o`_','*'"|iex|iex;$n'*'"|iex|iex

Try it online!Try it online!

PowerShell, 92 bytes

I think there's definitely some room for optimization here; A lot of the bytes are just there to handle the cases with the leading "\d "

$t=1;-split$args|%{$t*=$_-replace'\(','+('-creplace'[A-Z][a-z]*','+1'-replace'_','*'|iex};$t

Try it online!

Honorary Mention, PowerShell, 99 bytes

This was my first solution, and I really liked it. Including it here because I think it's fun.

$o="'-creplace'";"'$args$o^','`$n=$o=\d','`$0;`$n*=$o\(','+($o[A-Z][a-z]*','+1$o`_','*'"|iex|iex;$n

Try it online!

PowerShell, 92 bytes

I think there's definitely some room for optimization here; A lot of the bytes are just there to handle the cases with the leading "\d "

$t=1;-split$args|%{$t*=$_-replace'\(','+('-creplace'[A-Z][a-z]*','+1'-replace'_','*'|iex};$t

Try it online!

Honorary Mention, PowerShell, 99 92 bytes

This was my first solution, and I really liked it. Including it here because I think it's fun.

$o="'-creplace'";"'$args$o^(\d)(.*)','`$1*(`$2)$o\(','+($o[A-Z][a-z]*','+1$o`_','*'"|iex|iex

Try it online!

added 983 characters in body
Source Link

PowerShell, 92 bytes

I think there's definitely some room for optimization here; A lot of the bytes are just there to handle the cases with the leading "\d "

$t=1;-split$args|%{$t*=$_-replace'\(','+('-creplace'[A-Z][a-z]*','+1'-replace'_','*'|iex};$t

Try it online!

Honorary Mention, PowerShell, 99 bytes

This was my first solution, and I really liked it. Including it here because I think it's fun.

$o="'-creplace'";"'$args$o^','`$n=$o=\d','`$0;`$n*=$o\(','+($o[A-Z][a-z]*','+1$o`_','*'"|iex|iex;$n

Try it online!

PowerShell, 92 bytes

I think there's definitely some room for optimization here; A lot of the bytes are just there to handle the cases with the leading "\d "

$t=1;-split$args|%{$t*=$_-replace'\(','+('-creplace'[A-Z][a-z]*','+1'-replace'_','*'|iex};$t

Try it online!

PowerShell, 92 bytes

I think there's definitely some room for optimization here; A lot of the bytes are just there to handle the cases with the leading "\d "

$t=1;-split$args|%{$t*=$_-replace'\(','+('-creplace'[A-Z][a-z]*','+1'-replace'_','*'|iex};$t

Try it online!

Honorary Mention, PowerShell, 99 bytes

This was my first solution, and I really liked it. Including it here because I think it's fun.

$o="'-creplace'";"'$args$o^','`$n=$o=\d','`$0;`$n*=$o\(','+($o[A-Z][a-z]*','+1$o`_','*'"|iex|iex;$n

Try it online!

Source Link

PowerShell, 92 bytes

I think there's definitely some room for optimization here; A lot of the bytes are just there to handle the cases with the leading "\d "

$t=1;-split$args|%{$t*=$_-replace'\(','+('-creplace'[A-Z][a-z]*','+1'-replace'_','*'|iex};$t

Try it online!