Displaying 5 results from an estimated 5 matches for "pcrepattern".
2025 Jan 15
1
Weird and changed as.roman() behavior
...t;^I{,2}$", c("II", "III", "IIII"))
> [1] TRUE TRUE FALSE
Both the TRE and the PCRE specification only allow repetition quantifiers of the form
{a}
{a,b}
{a,}
https://laurikari.net/tre/documentation/regex-syntax/
https://www.pcre.org/original/doc/html/pcrepattern.html#SEC17
{,2} and {,4} are thus invalid and seem to result in undefined behaviour (which PCRE and TRE fill in different ways, but consistently not what was intended).
> > grepl("^I{,2}$", c("II", "III", "IIII"))
> [1] TRUE TRUE FALSE
> >...
2025 Jan 16
2
Weird and changed as.roman() behavior
...IIII"))
>> [1] TRUE TRUE FALSE
> Both the TRE and the PCRE specification only allow repetition quantifiers of the form
> {a}
> {a,b}
> {a,}
> https://laurikari.net/tre/documentation/regex-syntax/
> https://www.pcre.org/original/doc/html/pcrepattern.html#SEC17
> {,2} and {,4} are thus invalid and seem to result in undefined behaviour (which PCRE and TRE fill in different ways, but consistently not what was intended).
>> > grepl("^I{,2}$", c("II", "III", "IIII"))
>> [1] T...
2023 Jul 25
1
Bug in perl=TRUE regexp matching?
...token by
>> PCRE.? I think this makes it a little clearer what's going on:
>>
>> ????? gsub("\\w", "a", "?", perl=TRUE)
>> ????? [1] "?"
>>
>> So no match.? The PCRE docs
>> https://www.pcre.org/original/doc/html/pcrepattern.html (this might be
>> the old docs, but it works for our purposes here) mention we can turn on
>> unicode property matching with the "(*UCP)" token:
>>
>> ?????? gsub("(*UCP)\\w", "a", "?", perl=TRUE)
>> ?????? [1] "a"...
2023 Jul 23
1
Bug in perl=TRUE regexp matching?
The help page for `?gsub` says (in the context of performance
considerations):
"... just one UTF-8 string will force all the matching to be done in
Unicode"
However, this thread on SO: https://stackoverflow.com/q/76749529 gives
some indication that this is not true for `perl = TRUE`. Specifically:
> strings <- c("89 562", "John Smith", "???????
2025 Jan 15
2
Weird and changed as.roman() behavior
>>>>> Jani V?limaa
>>>>> on Tue, 14 Jan 2025 20:39:19 +0200 writes:
> Hello,
> I don't know what's changed or how to figure out why as.roman() started
> to work different way lately on Mageia Cauldron. Cauldron is the
> latest development version of Mageia Linux.
> Expected bahavior:
>>