Skip to content
Prev 7142 / 15075 Next

extracting a matched string using regexpr Possible BUG

FWIW I don't think \d is a basic regexp so as I would expect the perl mode to work and it does:
[1] "12345"

Yet I agree that if should either fail (i.e. return the unmodified string) or return 12345.

Also note that the bug is locale-specific:

LANG=C R
[1] "12345"
[1] "12345"

Also note that this is not Mac-specific:
[1] "WWWWW"
Linux 2.6.32-trunk-amd64
[1] "en_US.UTF-8"


Cheers,
Simon
On May 6, 2010, at 6:54 AM, David Winsemius wrote: