Literal Characters and Metacharacters
This lesson is called Literal Characters and Metacharacters, part of the Data Cleaning with R course. This lesson is called Literal Characters and Metacharacters, part of the Data Cleaning with R course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Loading transcript...
Your Turn
Write a regexp that can match tail, tool, tall, and toil
How can we match Jocelyn, Jocelin, and Joselyn but not Jozelyn using character sets?
a) Joscel[iy]n
b) Jo[sc^z]el[yi]n
c) Jo[sc]el[yi]n
Which of these regular expressions matches food at the beginning of a string?
a) ^food
b) food
c) $food
d) food^
Learn More
Gastón Sánchez has a nice book Handling Strings with R. Chapter 10 (Literal Characters) and Chapter 11 (Metacharacters) give an overview of these two concepts.
Course Content
32 Lessons