DEV Community

0 seconds of 0 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
00:00
 
James Bubb
James Bubb

Posted on

5 4

JavaScript RegEx Exercises 01

Get the exercises here: https://gist.github.com/codebubb/bb19d7ae24cd41695cb3c5ec3b1155d5

01:06 Exercise 1 (Final Answer 05:22)
05:49 Exercise 2 (Final Answer 06:42)
07:00 Exercise 3 (Final Answer 08:33)
09:13 Exercise 4 (Final Answer 10:57)
11:15 Exercise 5 (Final Answer 12:42)

— Follow Me —
Twitter: https://www.twitter.com/codebubb
Facebook: https://www.facebook.com/juniordevelopercentral/
Blog: https://www.juniordevelopercentral.com/
— Thanks! —

In these JavaScript RegEx tutorials you'll get the chance to learn a bit about RegEx in JavaScript and how you might use it to process or extract data in strings.

There are a number of instances when you might want to match a pattern in a string within your JavaScript code and these 5 exercises will show you some examples of when you might want to do this and also how you would go about doing with a JavaScript Regular Expression.

Although Regular Expressions aren't exclusive to JavaScript there are some specific JavaScript functions like the JavaScript match and JavaScript replace functions which allow you to use a Regular Expression to match a pattern within the string the function is used with.

The examples in the exercises are a bit contrived but they've been designed so you get a bit of exposure to some of the basic operations that can be done with RegEx patterns.

If you enjoy this tutorial, check out some of the other Junior Developer Central JavaScript practice exercises in the series: https://www.youtube.com/watch?v=N65RvNkZFGE&list=PLpc_YvcwbxaSn6jn0VaTcG8A0Grgs1GSB

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more