Removed unneeded casts. Moved regexp compilation outside of Parse body.