On 01.06.2010 02:19, David Winsemius wrote:

On May 31, 2010, at 8:14 PM, jim holtman wrote:

try this:

input <- readLines("yourfile.txt")
# determine start
start <- grep("\tBegin Main\t", input)[1] # first line if many

Puzzled. I thought backslashes in grepping patterns needed to be
doubled? I guess not.



Well, yes, for a backslash, but here a tab is specified, but no backslash at all.

Additionally, see ?regex:
"The current implementation interprets \a as BEL, \e as ESC, \f as FF, \n as LF, \r as CR and \t as TAB."

Uwe Ligges

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to