From dtenenba at fredhutch.org  Thu Jan  8 00:25:12 2015
From: dtenenba at fredhutch.org (Dan Tenenbaum)
Date: Wed, 7 Jan 2015 15:25:12 -0800 (PST)
Subject: [Rd] gsub with perl=TRUE results in 'this version of PCRE is not
 compiled with Unicode property support' in R-devel
In-Reply-To: <2015227063.2704396.1420672747520.JavaMail.root@fredhutch.org>
Message-ID: <1545603508.2704628.1420673112345.JavaMail.root@fredhutch.org>

The following code:

res <- gsub("(*UCP)\\b(i)\\b", 
    "", "nhgrimelanomaclass", perl = TRUE)

results in:

Error in gsub(sprintf("(*UCP)\\b(%s)\\b", "i"), "", "nhgrimelanomaclass",  : 
  invalid regular expression '(*UCP)\b(i)\b'
In addition: Warning message:
In gsub(sprintf("(*UCP)\\b(%s)\\b", "i"), "", "nhgrimelanomaclass",  :
  PCRE pattern compilation error
	'this version of PCRE is not compiled with Unicode property support'
	at '(*UCP)\b(i)\b'

on

R Under development (unstable) (2015-01-01 r67290)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base 

And also on the same version of R-devel on Snow Leopard, Windows, and Linux. But it does not produce an error on

R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

Dan



[Rd] gsub with perl=TRUE results in 'this version of PCRE is not compiled with Unicode property support' in R-devel
Dan Tenenbaum