Question: Please provide a regular expression to match all telephone numbers associated with variable phones: phones

Please provide a regular expression to match all telephone numbers associated with variable phones:

phones <- c("+1 (123) 904 6517", "(212) 323 2218", " 2197338965", "329-293-8753 ", "595 794 7569", "+1 387 287 6718", "233.398.9187 ", "482 952 3315", "Work: 579-499-7527", "Home: 543.355.3679")

Please underscore the characters, if any, that match the pattern specified by the regular expression [Dd]onald( [Jj].)? [Tt]rump in the following sentences,

Hi, Donald j trump. Nice to meet you.

i bet i can spell better than you and donald( trump combined

I met with Donald J Trump yesterday

CNN reported that President Donald J. Trump visited the university yesterday

Carve your own Donald Trumpkin in time for Halloween

Another man is also called Donald Jj. Trump

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!