Using Regular Expressions exec Method to Split a String

preview_player
Показать описание
The exec method on regular expression objects has a nice feature that can be used to break a string into an array. Basically when you use capturing groups, those groups become elements in an array. We look at that in this tutorial.

For more resources on JavaScript:

Full personalized courses on JavaScript:

Courses offered on Udemy: Getting Started or Advanced Topics at a huge discount:

Tutorials referred to in this video:
Рекомендации по теме
Комментарии
Автор

Thank you very much for constantly providing these super practical javascript tutorials.

rotrose
Автор

thanks, probably i will use it somewhere

georgesmith
Автор

Would 2018-12/5 be accepted as a valid date? If so, how can you use regex to verify that all the separators are the same?

aryanistane
Автор

How do we capture strings before an after a string? For example, "Sunny is coming to youtube" .. How can I remove strings before and after "coming".

sunnypepple
Автор

How do we capture strings before an after a string? For example, "Sunny is coming to youtube" .. How can I remove strings before and after "coming".

sunnypepple