Hello,
I need to identify all elements which have a sequence of 3 consecutive upper
case letters, anywhere in the string.
I tested my grep expression on this site: http://regexlib.com/RETester.aspx
But when I try it in R, it does not filter anything.
str -c(AGH, this WOUld be good, Not Good at
Try
str[grep('[[:upper:]]{3}',str)]
On 06/11/06, Lapointe, Pierre [EMAIL PROTECTED] wrote:
Hello,
I need to identify all elements which have a sequence of 3 consecutive upper
case letters, anywhere in the string.
I tested my grep expression on this site: http://regexlib.com/RETester.aspx
Quoting David Barron [EMAIL PROTECTED]:
Try
str[grep('[[:upper:]]{3}',str)]
or more efficiently :
grep('[[:upper:]]{3}', str, value = TRUE)
On 06/11/06, Lapointe, Pierre [EMAIL PROTECTED] wrote:
Hello,
I need to identify all elements which have a sequence of 3 consecutive upper
case
Lapointe, Pierre [EMAIL PROTECTED] writes:
Hello,
I need to identify all elements which have a sequence of 3 consecutive upper
case letters, anywhere in the string.
I tested my grep expression on this site: http://regexlib.com/RETester.aspx
But when I try it in R, it does not filter