Learn MORE JavaScript on the ServiceNow Platform: Lesson 6 Exercise - Regular Expressions (RegEx)

preview_player
Показать описание
/Show me \*your\* moves!/gmi

00:00 Intro and exercise
00:44 Solution
01:58 Parenthesis vs. Curly braces

Full transcript is available via closed captions on the YouTube player.

Рекомендации по теме
Комментарии
Автор

Explanation of the pattern:

^ asserts the start of the string.
\( matches the opening parenthesis.
\d{3} matches exactly three digits.
\) matches the closing parenthesis.
\s matches a single space.
\d{3} matches exactly three digits.
- matches the dash.
\d{4} matches exactly four digits.
$ asserts the end of the string.

hamadbaseer