Javascript (11) - Objet RegExp

23 Jan 2019 · 13 min
12:45

In this French‑language tutorial, the presenter introduces JavaScript regular expressions (Regex) and demonstrates how to create and use them for pattern matching on strings. The lesson covers two creation methods – literal syntax with slashes and the RegExp constructor – and shows how to apply the test() method to obtain a Boolean result. It explains the role of anchors (^ for start, $ for end) and the need to escape special characters such as the dot. The speaker then explores character classes and ranges (e.g., [a‑z]), quantifiers (+, ?, {m,n}) to control repetition, and the shorthand \w for alphanumeric plus underscore. Practical examples validate image file names and extensions (e.g., .png, .jpg, .jpeg) and enforce length constraints on the filename. Throughout, the instructor emphasizes the expressive power of regex compared to simpler string methods like indexOf, and encourages experimentation for more advanced use cases.

Chapters

More from Yamossoun

8:56
youtube.com

Compteur synchrone - Logique séquentielle

2w ago
11:58
youtube.com

Compteur asynchrone et diviseur de fréquence - Logique séquentielle

3w ago
11:37
youtube.com

Les registres (parallèle et à décalage) - Logique séquentielle

1mo ago
6:14
youtube.com

Bascule T (Toggle) - Logique séquentielle

1mo ago
12:05
youtube.com

Bascule JK - Logique séquentielle

1mo ago
9:17
youtube.com

Bascule D flip-flop active sur front montant - Logique séquentielle

1mo ago
10:08
youtube.com

Bascule D Latch - Logique séquentielle

1mo ago
8:13
youtube.com

Bascule RS - Logique séquentielle

1mo ago
5:04
youtube.com

Logique séquentielle - Introduction

2mo ago
1:15
youtube.com

Le codeur - Logique combinatoire #codeur #logique #circuit #booleanlogic

2mo ago
1:56
youtube.com

Algorithme de calcule de la racine carrée par dichotomie #dichotomy #squareroot #algorithm

3mo ago
See all content