Auto corrected by following Lint Ruby Performance/RegexpMatch
Click here to configure it on awesomecode.io