String to RegExp method changed