Learn the basics of using regular expressions / regex in your JavaScript applications.
Check out Cody Seibert’s main channel: https://www.youtube.com/channel/UCsrVDPJBYeXItETFHG0qzyw
—
Learn to code for free and get a developer job: https://www.freecodecamp.com
Read hundreds of articles on programming: https://medium.freecodecamp.com
And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp
Original source
12 responses to “Regular Expressions (Regex) in JavaScript – tutorial”
thank you so much !!!!!
very helpful video, thanks!
this was great. thanks!
cool thnx mate
@7:27 bit confused as to why that doesn't match. "'There's no character [a-z] here." I agree, but if you remove the whitespace & 'and' at the end of the sentence, it will match
why does 0 or more [a-z] characters get ignored when at the end of a sentence, but not in the middle?
eg:
my name is 0 and i'm 34
/my name is [a-z]*/ — matches "my name is"
/my name is [a-z]* and/ — doesn't match anything
@3:36 ah, you've gotten to that age when you forget how old you are. i was 27 when it happened to me XD
Regex is the term for not being accepted
this was interesting, but I'm searching for a secret of matching titles in an app. A few song titles are one word, but most have several words. In the app, I'd like for the spaces between words to be either ignored or not have the JavaScript eliminate the space once it was recognized as a match. I'm not sure if the problem is regex or getting JavaScript to play ball.
I see my mistake now, I had my string literal within quotes. I thought I was supposed to treat the regex pattern as a string literal.
cool it gave me a better understanding of regex
Brilliant introduction to the topic…very good content for beginners…
Good stuff, but the volume is too low for a YT video. I had to increase the volume, but then all the other videos were too high in volume.