fix parsing of RegEx match expression containing a cast