Skip to main content
added 22 characters in body
Source Link

sed -E, 69 6069 60 59 bytes

s/([FS][^FS]*){2}S/&K/;s/(B[^B]*[^B]*B){34}B/&H/;s/[^KHX]*(.).*/\1/

Try it online!Try it online!

9 bytes off, thanks to math junkie.

Input on stdin.

Output on stdout: H for walk, K for strikeout, X for in play.

sed -E, 69 60 bytes

s/([FS][^FS]*){2}S/&K/;s/(B[^B]*){3}B/&H/;s/[^KHX]*(.).*/\1/

Try it online!

9 bytes off, thanks to math junkie.

Input on stdin.

Output on stdout: H for walk, K for strikeout, X for in play.

sed -E, 69 60 59 bytes

s/([FS][^FS]*){2}S/&K/;s/([^B]*B){4}/&H/;s/[^KHX]*(.).*/\1/

Try it online!

9 bytes off, thanks to math junkie.

Input on stdin.

Output on stdout: H for walk, K for strikeout, X for in play.

added 8 characters in body
Source Link

sed -E, 69 60 bytes

s/([FS][^FS]*){2}S/&K/;s/(B[^B]*){3}B/&H/;s/[^KHX]*(.).*/\1/

Try it online!Try it online!

9 bytes off, thanks to math junkie.

Input on stdin.

Output on stdout: H for walk, K for strikeout, X for in play.

sed -E, 69 60 bytes

s/([FS][^FS]*){2}S/&K/;s/(B[^B]*){3}B/&H/;s/[^KHX]*(.).*/\1/

Try it online!

9 bytes off, thanks to math junkie.

Input on stdin.

Output on stdout: H for walk, K for strikeout, X for in play.

sed -E, 69 60 bytes

s/([FS][^FS]*){2}S/&K/;s/(B[^B]*){3}B/&H/;s/[^KHX]*(.).*/\1/

Try it online!

9 bytes off, thanks to math junkie.

Input on stdin.

Output on stdout: H for walk, K for strikeout, X for in play.

added 33 characters in body
Source Link

sed -E, 6969 60 bytes

s/([FS][^FS]*){2}S/&s&K/;s/(B[^B]*){3}B/&w/;y/HX/wp&H/;s/[^wsp]*[^KHX]*(.).*/\1/

Try it online!Try it online!

9 bytes off, thanks to math junkie.

Input on stdin.

Output on stdout: wH for walk, sK for strikeout, pX for in play.

sed -E, 69 bytes

s/([FS][^FS]*){2}S/&s/;s/(B[^B]*){3}B/&w/;y/HX/wp/;s/[^wsp]*(.).*/\1/

Try it online!

Input on stdin.

Output on stdout: w for walk, s for strikeout, p for in play.

sed -E, 69 60 bytes

s/([FS][^FS]*){2}S/&K/;s/(B[^B]*){3}B/&H/;s/[^KHX]*(.).*/\1/

Try it online!

9 bytes off, thanks to math junkie.

Input on stdin.

Output on stdout: H for walk, K for strikeout, X for in play.

deleted 1 character in body
Source Link
Loading
Source Link
Loading