开始使用免费开始使用

Hunting for phone numbers

For your first task you are going to pull out the phone numbers from this vector of contact information:

contact

You'll assume the phone numbers you are looking for follow the American standard of a three digit area code, a three digit exchange and then a four digit number, but each part could be separated by spaces or various punctuation symbols.

本练习是课程的一部分

String Manipulation with stringr in R

查看课程

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Create a three digit pattern
three_digits <- ___

# Test it
str_view_all(contact, pattern = three_digits)
编辑并运行代码