[R] grep searching for sequence of 3 consecutive upper case letters

2006-11-06 Thread Lapointe, Pierre
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

Re: [R] grep searching for sequence of 3 consecutive upper case letters

2006-11-06 Thread David Barron
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

Re: [R] grep searching for sequence of 3 consecutive upper case letters

2006-11-06 Thread rfrancois
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

Re: [R] grep searching for sequence of 3 consecutive upper case letters

2006-11-06 Thread Peter Dalgaard
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