I thought that I can use metacharacters such as \w to match word characters
with one backslash.  But for some reason, I need to include two backslashes.

> grepl(pattern='\w', x="what")
Error: '\w' is an unrecognized escape in character string starting "\w"

> grepl(pattern='\\w', x="what")
[1] TRUE

I can't find the reason for this on the help pages.  Does anyone know why?

Thanks!

	[[alternative HTML version deleted]]

