Regular expression for R programming language