From the course: Learning the JavaScript Language
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Regular expressions - JavaScript Tutorial
From the course: Learning the JavaScript Language
Regular expressions
- [Instructor] In this lesson, we're going to take a look at regular expressions, which are a way of searching text for patterns. When you're working with text like strings and JavaScript, but also if you're working with long runs of text in prose, there may be times when you want to find a particular something, but maybe not an exact something. Maybe you can describe it with a pattern that it should follow, like two digits followed by any number of letters, or any word that starts with A and ends with S. A regular expression is a way to describe something that you're searching for with an abstract pattern. In JavaScript, a regular expression is another data type just like numbers or strings, and it looks like this. Now, if we just have two slashes with nothing in between 'em, that is, of course, a line comment, but it becomes a regular expression when there's something in between those slashes. That can be words, it…
Contents
-
-
-
-
-
Objects4m 13s
-
(Locked)
Using objects for data modeling2m 33s
-
(Locked)
Manipulating objects4m 24s
-
(Locked)
Jargon: References4m 39s
-
(Locked)
Arrays5m 35s
-
(Locked)
Manipulating arrays7m 36s
-
(Locked)
Readability: Whitespace3m 24s
-
(Locked)
Readability: Comments4m 57s
-
(Locked)
Regular expressions6m 9s
-
-
-
-
-
-