Move to an OO interface that aligns with the RegExp object.