From 2adf879e2318fe4881aed9ef1fab0c2808641e71 Mon Sep 17 00:00:00 2001 From: Ben Marwick Date: Thu, 22 Jun 2017 00:39:18 +1000 Subject: [PATCH] add 'not' to description of [^?.] regex because: ``` > grepl("[^?.]$", c("this should not match.", " This should not?")) [1] FALSE FALSE ``` --- 3_GETDATA/Getting and Cleaning Data Course Notes.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3_GETDATA/Getting and Cleaning Data Course Notes.Rmd b/3_GETDATA/Getting and Cleaning Data Course Notes.Rmd index 4f342da..c0c4802 100644 --- a/3_GETDATA/Getting and Cleaning Data Course Notes.Rmd +++ b/3_GETDATA/Getting and Cleaning Data Course Notes.Rmd @@ -679,7 +679,7 @@ $\pagebreak$ * `[0-9]` = searches for a a range of characters (character class) * *example*: `[a-zA-Z]` will match any letter in upper or lower case * `[^?.]` = when used at beginning of character class, "^" means not (metacharacter) - * *example*: `[^?.]$` matches any line that does end in "." or "?" + * *example*: `[^?.]$` matches any line that does not end in "." or "?" * `.` = any character (metacharacter) * *example*: `9.11` matches 9/11, 9911, 9-11, etc * `|` = or, used to combine subexpressions called alternatives (metacharacter)