R = regexpPattern(...)
regexpPattern Pattern from regular expression.
pat = regexpPattern('\d+'); extract("abc123", pat)