On Tue, Oct 29, 2013 at 1:13 PM, Lopez, Dan <lopez235 at llnl.gov> wrote: > grep("^([a-z]+) +\1 +[a-z]+ [0-9]",lines) Your expression has a typo: R> grep("^([a-z]+) +\\1 +[a-z]+ [0-9]",lines) [1] 2 -- Sarah Goslee http://www.functionaldiversity.org