We may earn an affiliate commission when you visit our partners.
Course image
Udemy logo

Mastering Regular Expressions in JavaScript

Steven Hancock

Regular expressions can help you more easily solve programming problems. They are an important tool in your coding toolbox. If you have dabbled with regular expressions or not even used them before, this course is for you. You will learn the syntax and participate in numerous examples and exercise to help you integrate regular expressions into your JavaScript code.

Read more

Regular expressions can help you more easily solve programming problems. They are an important tool in your coding toolbox. If you have dabbled with regular expressions or not even used them before, this course is for you. You will learn the syntax and participate in numerous examples and exercise to help you integrate regular expressions into your JavaScript code.

In Mastering Regular Expressions in JavaScript we focus on two main goals: Helping you learn regular expressions and how to construct them, and teaching you the powerful ways regular expressions can be used in JavaScript. If you work in the JavaScript language, this course will be most useful, but even if you work in another language you can use this course to learn about regular expressions as the syntax applies to many programming languages.

This course provides numerous opportunities to apply what is being taught. In fact one of the final sections is devoted to applying regular expressions, which basically presents different scenarios and then gives you a chance to solve them before  going through it with the instructor.

This course contains 9 sections, over 60 different lectures, over 5 hours of video tutorials, 5 exercises, 5 quizzes and 12 application lectures that will make sure you have what you need to use regular expressions in your JavaScript coding work.

If you are ready to master regular expressions, this course is for you.

Enroll now

What's inside

Learning objectives

  • Create basic regular expressions for matching data.
  • Make use of all the javascript methods that accept regular expressions.
  • Understand the differences between the varied javascript methods used with regular expressions.
  • Test regular expressions before deploying them in your code.
  • Understand regular expression syntax.
  • Define more complex patterns using regular expressions.
  • Use metacharacters and characters sets in defining patterns.
  • Take advantage of repetition and grouping.
  • Use anchored expressions and lookahead assertions correctly.
  • Include unicode when necessary.
  • Solve common regular expression problems in javascript.
  • Show more
  • Show less

Syllabus

Introduction
At the conclusion of this section you will be able to identify the history of regular expressions. You will be able to access regEx Pal and complete basic regular expressions for JavaScript.
Read more
Regular Expressions: A Short History
Getting Started
Using Regular Expressions in JavaScript
Understanding Regular Expression Flags
Using Regexpal
Download Text Strings
At the conclusion of this section, you will be able to include different characters, escape characters, make use of meta-characters and use the wildcard in your regular expressions.
Understanding Metacharacters
Using the Wildcard

In the previous topic I mentioned that the wildcard character . represents any single character with the exception of some control characters like new line. Well in ECMAScript release 2018 a new flag was added to regular expressions in JavaScript. The new flag is the letter 's' and it called the dotAll Flag. This flag can be added to your regular expression if you would like the wildcard character to match all characters.

The dotAll flag can be included with other flags such as global 'g' or case insensitive 'i'.

Escaping Metacharacters
Matching Control Characters

Take a moment and check your knowledge of the characters section.

Exercise 1 Start
Exercise 1 Finish
At the conclusion of this section you will be able to define character sets, specify a range, negate the characters in a set, use escape sequences and use shorthand for character sets.
Using Character Sets
Specifying a Range in a Character Set
Excluding a Character Set
Escaping Metacharacters in a Character Set
Using Shorthand for Character Sets

Take a moment and check your knowledge of character sets.

Exercise 2 Start
Exercise 2 Finish
At the conclusion of this section you will be able to use repetition by specifying the amount or not. You will also be able to explain the concept of lazy and greedy.
Using Repetition in Your Patterns
Understanding Greediness and Laziness in Regular Expressions
Specifying a Repetition Amount
Revisiting Greedy and Lazy Concepts

Take a moment to check your knowledge of repetition and the concepts of greedy and lazy expressions.

Exercise 3 Start
Exercise 3 End
At the conclusion of this section you will be able to use word anchors and start and end anchors.
Understanding Anchored Expressions
Using Start and End Anchors
Using the Multi-line Flag
Working with Word Boundaries
Writing Accurate Regular Expressions

Take a moment to check your knowledge of anchors.

Exercise 4 Start
Exercise 4 Finish
At the conclusion of this section you will be able to work with alternates and use groups to organize and capture portions of your regular expression as well as for look aheads and references.
Specifying Options
Using Grouping
Using Grouping with JavaScript
Understanding Capturing Groups
Understanding Group Back References

Named capture groups were introduced in ECMAScript 2018 and are now widely supported.

Using Lookahead Groups
Using Negative Lookahead Groups

Lookbehind groups were introduced in ECMAScript 2018 and are now widely supported.

Take a moment and check your knowledge of alternates and groups.

Exercise 5 Start
Exercise 5 End
Exercise 5 Follow Up
At the conclusion of this section you will understand how to use unicode in regular expressions.
Introducing Unicode
Using Unicode Characters
Understanding ES6 Unicode Features
At the completion of this sections you will be able to apply regular expressions to help solve many common problems such as checking email addresses, twitter handles, passwords and more.
Applying Regular Expressions
Matching an Email Address
Matching a Twitter Handle
Testing Passwords
Using Replace with Regular Expressions
Matching a Word Next to Another Word
Validating Dates
Validating Dates Revisited
Validating IP Numbers
Capturing Matched Text
Discovering Information About a Match
Iterating Over Matches
Iterating Over Matches Take 2
Conclusion
BONUS Lecture! Discounts on Other Courses

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Suitable for JavaScript developers who want to enhance their coding skills
Provides in-depth coverage of regular expressions, making it suitable for learners who want a comprehensive understanding of the topic
Taught by experienced instructors with expertise in JavaScript and regular expressions, ensuring high-quality content
Involves hands-on exercises and quizzes, providing opportunities for learners to apply their knowledge and receive feedback
Beginners may find some concepts challenging, requiring additional effort to grasp the material
Intermediate learners will find the course engaging and beneficial for expanding their knowledge of regular expressions

Save this course

Save Mastering Regular Expressions in JavaScript to your list so you can find it easily later:
Save

Reviews summary

Excellent course

According to students, this course is an Excellent course and thoroughly enjoyed. Students appreciate how crystal clear the instructor explains the course concepts. Overall, learners highly recommend this course.

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Mastering Regular Expressions in JavaScript with these activities:
Matching metacharacters exercise
Practice identifying and using metacharacters to define patterns in regular expressions.
Browse courses on Metacharacters
Show steps
  • Identify the different types of metacharacters used in regular expressions.
  • Create regular expressions using metacharacters.
  • Test your regular expressions to ensure they match the desired patterns.
Pair Programming Exercise
Collaborate with a peer to solve coding challenges involving JavaScript regular expressions.
Browse courses on Regular Expressions
Show steps
  • Find a partner with similar skill level.
  • Choose a coding challenge that involves regular expressions.
  • Work together to solve the challenge, sharing ideas and perspectives.
  • Review and discuss each other's solutions.
Anchors and Lookahead Assertions Tutorial
Review the use of anchors and lookahead assertions to enhance regular expression patterns.
Browse courses on Anchors
Show steps
  • Understand the concept of anchors and lookahead assertions.
  • Follow a tutorial on using anchors and lookahead assertions in regular expressions.
  • Practice using anchors and lookahead assertions to create more specific patterns.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Regex Playground
Build an interactive tool that allows users to experiment with different regular expression patterns.
Browse courses on JavaScript
Show steps
  • Design the user interface of the tool.
  • Implement the logic for evaluating regular expressions.
  • Make the tool accessible online or through a desktop application.
Mastering Regular Expressions
Gain a comprehensive understanding of regular expressions through a detailed reference book.
Show steps
  • Read through the book, focusing on the chapters relevant to JavaScript regular expressions.
  • Work through the exercises and examples provided in the book.
  • Apply the concepts to your own regular expression patterns.
Regex Challenge
Test your regular expression skills against others in a competitive environment.
Browse courses on Regular Expressions
Show steps
  • Find a regex challenge or competition.
  • Study and practice regular expression techniques.
  • Compete in the challenge and compare your performance to others.
Character Set Patterns Video
Create a concise and informative video to demonstrate how to use character sets in regular expression patterns.
Show steps
  • Plan the content and outline the key concepts to cover.
  • Record a video explaining the use of character sets in regular expressions.
  • Edit the video to ensure clarity and conciseness.
  • Publish the video on a platform like YouTube or Vimeo.

Career center

Learners who complete Mastering Regular Expressions in JavaScript will develop knowledge and skills that may be useful to these careers:
Software Developer
Software Developers work to bring digital products to life by translating concepts into code. With a course like Mastering Regular Expressions in JavaScript, a learner may help build a foundation for career success. JavaScript is one of the most sought-after coding languages currently and regular expressions offer an efficient way to process strings. Furthermore, the course offers instruction on the integration of regular expressions into JavaScript code.
Web Developer
Web Developers design and develop websites. In this role, you are responsible for translating the concept for a website into a real world digital interface that users can interact with. Knowing regular expressions can be very helpful for a Web Developer since it improves the efficiency of processing information on the web.
Full-Stack Developer
Full Stack Developers carry out duties associated with both frontend and backend web development. The knowledge one would gain by taking Mastering Regular Expressions in JavaScript can be very helpful since it gives you the ability to work efficiently with different programming languages. Regular expressions are applied across many languages.
Data Analyst
Data Analysts clean, process, and analyze data. They transform raw data into meaningful visuals and reports that can be used to inform better business decisions. Regular expressions can be used to extract meaningful data from both structured and unstructured sources. Mastering Regular Expressions in JavaScript can help build a foundation for success in a Data Analyst role.
Security Engineer
Security Engineers protect vital computer systems from unauthorized access, cyber attacks, and other threats. Mastering Regular Expressions in JavaScript can be useful as regular expressions are used in security scanning tools to find potential security vulnerabilities in code or networks.
User Experience (UX) Designer
User Experience Designers work to improve the overall user experience, making it easy and enjoyable for users to interact with digital products. While regular expressions may not be a core responsibility, UX Designers who wish to go into development may find Mastering Regular Expressions in JavaScript helpful.
Technical Writer
Technical Writers create and maintain technical documentation such as user manuals, how-to guides, and other instructional materials. If your work involves documenting JavaScript, you may find that a course like Mastering Regular Expressions in Javascript can be helpful.
Quality Assurance Analyst
Quality Assurance Analysts ensure the quality of software products. They design and execute tests to identify and resolve defects. Mastering Regular Expressions in JavaScript may be useful as it can help with testing JavaScript code.
Database Administrator
Database Administrators manage and maintain databases, ensuring that they are available and performant. Mastering Regular Expressions in JavaScript may be useful as regular expressions can be used to query and manipulate data in databases.
Systems Analyst
Systems Analysts study an organization's current business processes and develop plans to improve efficiency. Mastering Regular Expressions in JavaScript can be useful for documenting and analyzing processes.
Network Administrator
Network Administrators install, configure, and maintain computer networks. Mastering Regular Expressions in JavaScript may be useful for analyzing network traffic and identifying patterns.
Project Manager
Project Managers plan, execute, and close projects. Some projects involve software development. If you work on projects involving JavaScript, you may find a course like Mastering Regular Expressions in JavaScript to be helpful.
Game Developer
Game Developers design and develop video games. Mastering Regular Expressions in JavaScript may be useful for developing game engines and scripting game logic.
Computer Scientist
Computer Scientists conduct research and develop new computing technologies. Mastering Regular Expressions in JavaScript may be useful for developing new algorithms and data structures.
Data Scientist
Data Scientists use scientific methods, processes, algorithms, and systems to extract knowledge and insights from data in various forms, both structured and unstructured. Mastering Regular Expressions in JavaScript may be useful for extracting data from unstructured sources.

Reading list

We've selected 11 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Mastering Regular Expressions in JavaScript.
Comprehensive collection of regular expression solutions to common programming problems. It is an excellent reference for developers who want to learn more about regular expressions or who need help with a specific problem.
Comprehensive guide to regular expressions. It covers everything from the basics to advanced topics such as Unicode support and performance optimization. It is an excellent resource for developers who want to learn more about regular expressions or who need help with a specific problem.
Comprehensive guide to regular expressions in JavaScript. It covers the basics of regular expressions as well as more advanced topics such as Unicode support and performance optimization. It great resource for JavaScript developers who want to learn more about regular expressions.
Practical guide to building real-world applications with JavaScript. It covers topics such as regular expressions, object-oriented programming, and performance optimization. It great resource for JavaScript developers who want to learn how to build robust and scalable applications.
Collection of design patterns for JavaScript. It covers topics such as regular expressions, object-oriented programming, and performance optimization. It great resource for JavaScript developers who want to learn how to design and develop reusable and maintainable code.
Concise reference to regular expressions. It covers the basics of regular expressions as well as more advanced topics such as Unicode support and performance optimization. It great resource for developers who need a quick reference to regular expressions.
Comprehensive reference to the JavaScript programming language. It covers everything from the basics to advanced topics such as regular expressions and object-oriented programming. It great resource for JavaScript developers who want to learn more about the language.
Comprehensive guide to the JavaScript programming language. It covers the basics of JavaScript as well as more advanced topics such as regular expressions and object-oriented programming. It great resource for JavaScript developers who want to learn more about the language.
Beginner-friendly guide to the JavaScript programming language. It covers the basics of JavaScript as well as more advanced topics such as regular expressions and object-oriented programming. It great resource for JavaScript developers who are new to the language.
Collection of essays on the good parts of the JavaScript programming language. It covers topics such as regular expressions, object-oriented programming, and performance optimization. It great resource for JavaScript developers who want to learn more about the language.
Beginner-friendly guide to the JavaScript programming language. It covers the basics of JavaScript as well as more advanced topics such as regular expressions and object-oriented programming. It great resource for JavaScript developers who are new to the language.

Share

Help others find this course page by sharing it with your friends and followers:
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser