Parse a Baseball Pitch String
Retina 0.8.2, 22 bytes

4=`B
H
2`F|S

1!`[XHS]


Try it online! Link includes test cases. Outputs X for ball in play, H for walk, and S for strikeout. Explanation:

4=`B
H


The fourth ball results in a walk, same as hit by pitch.

2`F|S


The first two foul balls/strikes are ignored.

1!`[XHS]


Take the first available result.