JavaScript RegExp

Regular expressions are a powerful, yet complex, technology to search for substrings within strings following particular patterns.

Difficulty

Novice

Course Duration

2 hrs 54 mins

Chapters

12

Exercises

1

Quizzes

3

Prerequisites

  • JavaScript

    This course explores regular expressions in JavaScript, likewise knowledge of the core language is required.

Course overview

Regular expressions, or simply regex, is a pattern-matching technology used widely across programming languages with the string data type to carry out complex searching. Regular expressions can be used to find simple to extremely complicated patterns within strings and extract them out in order for further processing.

Where string-based searching finds its stop, regex-based searching finds its start. Regular expressions are extremely powerful, useful and time-saving. Theoretically, they aren't very complicated to understand, however, if not understood the right way, they can quickly become really ugly!

This course teaches you how to work with regular expressions specifically in JavaScript. That is, you'll get to explore the built-in RegExp interface; how to construct regular expressions in JavaScript; how to change between fixed and dynamic expressions; and so on. You will learn a lot of concepts in the way and actually learn regular expressions the right way.

Learning outcomes

  • How to construct regular expressions for basic search patterns.
  • How to work with the RegExp interface in JavaScript.
  • How to craft regular expressions leveraging such diverse ideas as character sets, character classes, assertions and boundaries.
  • How to use flags to modify searching behavior to solve a wider array of searching problems.
  • What is grouping and backreferencing, and how they're vital to storing matched portions in a search and then operating on them.
  • How to analyze a searching problem and then design a regular expressions to test for it.

Table of contents

  1. Foundation

    In this unit we will discover all that there is in regular expressions. We'll begin with a brief introduction to regexp, then see how to write them, where to write them while consider a handful of examples. Moving further we'll discover how to modify searching behavior using flags; replicate patterns using quantifiers, match walls between characters using boundaries; capture matches for patterns; use string and regexp methods to solve searching problems.

FAQs

  • Are regular expressions difficult to learn?

    Not at all! There are not many things to learn in regular expressions; you can easily get fluent with understanding and creating regular expressions in just over a week.

  • Is learning regular expressions necessary for a JavaScript developer?

    While regular expressions aren't directly necessary in order to become a JavaScript developer, once you do learn them, you'll gain a lot of potential; learning regular expressions will supercharge your programming career. And most importantly, they aren't just limited to JavaScript; you can apply similar ideas to other programming languages as well.

  • What if I get stuck somewhere in the course?

    If you're having a hard time understanding a given concept in the course, feel free to reach out to us via our email mail@codeguage.com, describing the issue you're facing. We'll try our level best to help you out.

  • Some important topics are missing from the course. Why is that so?

    Our courses are released while they are still under construction so that our learners can get early previews. As we continuously work on adding more and more content to our courses, if a given topic isn't covered today, there's a high chance that it's already under way and will show up very soon. You can follow us on Twitter to be updated with our latest content releases.

  • How can I ask any general questions related to the course's content?

    Write to us at mail@codeguage.com.

It's different the 'Codeguage way'

Fundamentals-focused

When you have a robust foundation, with the fundamentals crystal-clear, your mind will intrinsically get that ability to handle any kind and level of complexity.

Comprehensive

With a comprehensive resource that covers literally every aspect of a given topic, your time is spent practicing the learnt concepts, not resolving confusions and basic questions.

Detailed

Coding is a detailed craft. Likewise, any resource trying to teach it in any way should be detailed as well, or else people will have to acquire those integral details from different places in a fragmented and haphazard manner.

Well-structured

Structure is vital to an intuitive learning experience of a given resource. Without structure, the right concepts get introduced at the wrong times, ultimately leading to confusion and breaking the desired flow of comprehension.

Let's start the learning!