You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In these particular cases we could use string methods `startsWith/endsWith` instead. Regular expressions should be used for more complex tests.
24
24
25
-
## Testing for a full match
25
+
## Test pour une correspondance complète
26
26
27
-
Both anchors together `pattern:^...$`are often used to test whether or not a string fully matches the pattern. For instance, to check if the user input is in the right format.
27
+
Les deux ancres mises ensemble `pattern:^...$`pour vérifier si une chaîne de caractères correspond entièrement à un paterne. Par exemple, pour vérifier si l'entrée de l'utilisateur est dans le bon format.
28
28
29
-
Let's check whether or not a string is a time in`12:34` format. That is: two digits, then a colon, and then another two digits.
29
+
Vérifions si une chaîne de caractères est une heure au format`12:34`. En résumé : deux nombres, puis deux points, et enfin deux autres nombres.
30
30
31
-
In regular expressions language that's`pattern:\d\d:\d\d`:
31
+
Dans le langage des expressions régulières, c'est`pattern:\d\d:\d\d`:
0 commit comments