Fix regex match for RHS based systems