Re: [R] : regular expressions: escaping a dot

2007-06-29 Thread S Ellison
EOF from a keyboard on Windows is often Ctrl+Z. But you're right; it's platform dependent. CtrlZ in Unix has less desirable effects on readLines(). And on your running R process... Drat. Peter Dalgaard [EMAIL PROTECTED] 29/06/2007 12:42:41 S Ellison wrote: Wouldn't it be nice if the Help

[R] : regular expressions: escaping a dot

2007-06-28 Thread Wolfram Fischer
What's really the problem with: regexpr( '\.odt$', Yodt, perl=TRUE ) Warning: '\.' is an unrecognized escape in a character string Warning: unrecognized escape removed from \.odt$ [1] 5 attr(,match.length) [1] 4 I know that I could use: regexpr(

Re: [R] : regular expressions: escaping a dot

2007-06-28 Thread Tobias Verbeke
Wolfram Fischer wrote: What's really the problem with: regexpr( '\.odt$', Yodt, perl=TRUE ) Warning: '\.' is an unrecognized escape in a character string Warning: unrecognized escape removed from \.odt$ [1] 5 attr(,match.length) [1] 4 I know that I

Re: [R] : regular expressions: escaping a dot

2007-06-28 Thread Prof Brian Ripley
On Thu, 28 Jun 2007, Wolfram Fischer wrote: What's really the problem with: regexpr( '\.odt$', Yodt, perl=TRUE ) Warning: '\.' is an unrecognized escape in a character string Warning: unrecognized escape removed from \.odt$ [1] 5 attr(,match.length) [1] 4

Re: [R] : regular expressions: escaping a dot

2007-06-28 Thread Peter Dalgaard
Prof Brian Ripley wrote: This is explained in ?regexp (in the See Also of ?regexpr): Patterns are described here as they would be printed by 'cat': _do remember that backslashes need to be doubled when entering R character strings from the keyboard_. and in the R FAQ and

Re: [R] : regular expressions: escaping a dot

2007-06-28 Thread Prof Brian Ripley
On Thu, 28 Jun 2007, Peter Dalgaard wrote: Prof Brian Ripley wrote: This is explained in ?regexp (in the See Also of ?regexpr): Patterns are described here as they would be printed by 'cat': _do remember that backslashes need to be doubled when entering R character