regexpr for rebuild. Rmd and rmd detected.