Skip to content
Coming soon: Ally. Your guide to the world of AI and R. Learn More →
R for the Rest of Us Logo

Data Cleaning with R

Literal Characters and Metacharacters

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.

Your Turn

Write a regexp that can match tailtooltall, and toil

How can we match JocelynJocelin, 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.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Amal Dahounto

Amal Dahounto • March 1, 2026

Hi When I right-click on the video to save it, I notice that the "save video as" link is disabled. How else can I download this cours videos? Thanks in advance for any help.