S_regmatch(): merge BOL and SBOL branches

The code body is the same for both of them.