Get startedGet started for free

Extracting an advanced regular expression

In this exercise, you will build on top of the prior exercises by creating a more advanced regular expression to capture the title of the movie, the company name of the distributor and the number of screens in each line of the screens_per_movie data frame.

Every line of screens_per_movie contains these three sections. Using extract you will extract these three and get three new columns with exactly the information you want in a tabular and structured form. This step is key if you want to make sense of unstructured data and bring it into a form that you can later analyze and visualize.

This exercise is part of the course

Intermediate Regular Expressions in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Print the first three lines of screens_per_movie
___[1:3, ]
Edit and Run Code