Fix regex to match documentation more efficiently