Add CompareStringOrRegex to string lib