Skip to content
Back to formatted view

Raw Message

Message-ID: <20240307121659.5969d579@arachnoid>
Date: 2024-03-07T09:16:59Z
From: Ivan Krylov
Subject: [R-pkg-devel]  [External] [External] RcmdrPlugin.HH_1.1-48.tar.gz
In-Reply-To: <d01e3364-07d5-4a12-855d-bc608402f29b@gmail.com>

On Wed, 6 Mar 2024 13:46:55 -0500
Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

> is this just a more or less harmless error, thinking that 
> the dot needs escaping

I think it's this one. You are absolutely right that the dot doesn't
need escaping in either TRE (which is what's used inside exportPattern)
or PCRE. In PRCE, this regular expression would have worked as intended:

# We do match backslashes by mistake.
grepl('[\\.]', '\\')
# [1] TRUE

# In PCRE, this wouldn't have been a mistake.
grepl('[\\.]', c('\\', '.'), perl = TRUE)
# [1] FALSE TRUE

-- 
Best regards,
Ivan