On Tue, Aug 7, 2012 at 10:18 PM, Marc Schwartz <marc_schwa...@me.com> wrote:
> That will get you values where punctuation characters are used, but there may 
> be other non-alphanumeric characters in the vector. There may be ASCII 
> control codes, tabs, newlines, CR, LF, spaces, etc. which would not be found 
> by using [:punct:].
>
> For example:
>
>> grepl("[[:punct:]]", " ")
> [1] FALSE
>
>
> If you want to explicitly look for non-alphanumeric characters, you would be 
> better off using a negation of [:alnum:] such as:
>
[..]

>
> !grepl("[[:alnum:]]", x)
>
Good point! Thanks.
Liviu

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to