Practice: text patternsExercices : les motifs textuels

ExerciseExercice 7 · HTML tagsbalises HTML intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find every HTML tag in the fragment, one per match.
Trouvez toutes les balises HTML du fragment, une par correspondance.
Test textTexte de test
<html><head><title>Page</title></head><body><p class="intro">Text</p><br/><input type="text"/></body></html> No tag: 3 > 2 and 1 < 4.
<html><head><title>Page</title></head><body><p class="intro">Texte</p><br/><input type="text"/></body></html> Pas de balise: 3 > 2 et 1 < 4.
Expected matches:Correspondances attendues : <html> <head> <title> </title> </head> <body> <pclass="intro"> </p> <br/> <inputtype="text"/> + 2 more+ 2 autres ␣ space · ⇥ tab · ⏎ line break · ◆ empty match␣ espace · ⇥ tabulation · ⏎ retour à la ligne · ◆ correspondance vide
Expected matches:Correspondances attendues : <html> <head> <title> </title> </head> <body> <pclass="intro"> </p> <br/> <inputtype="text"/> + 2 more+ 2 autres ␣ space · ⇥ tab · ⏎ line break · ◆ empty match␣ espace · ⇥ tabulation · ⏎ retour à la ligne · ◆ correspondance vide
//gmu
ExerciseExercice 8 · social media mentionsmentions de réseaux sociaux basicbasique not startedà faire solvedréussi keep tryingà retravailler
Find the mentions (@ followed by word characters). Look at what happens to the email address: the expression knows nothing about context.
Trouvez les mentions (@ suivi de caractères de mot). Observez le résultat sur l'adresse courriel : la regex ne connaît pas le contexte.
Test textTexte de test
Thanks @john_smith and @mary123 for your help! But not @ on its own or #hashtag. The address test@mail.com gives an unexpected result.
Merci @jean_dupont et @marie123 pour votre aide ! Mais pas @ seul ni #hashtag. L'adresse test@mail.com donne un résultat inattendu.
Expected matches:Correspondances attendues : @jean_dupont @marie123 @mail
Expected matches:Correspondances attendues : @john_smith @mary123 @mail
//gmu
ExerciseExercice 9 · words in capitalsmots en majuscules intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find the words written entirely in capitals, of at least 2 letters.
Trouvez les mots entièrement en majuscules d'au moins 2 lettres.
Test textTexte de test
The words URGENT, WARNING and IMPORTANT are in capitals, OK too. But not Urgent, warning, or I on its own.
Les mots URGENT, ATTENTION et IMPORTANT sont en majuscules, OK aussi. Mais pas Urgent, attention, ni I seul.
Expected matches:Correspondances attendues : URGENT ATTENTION IMPORTANT OK
Expected matches:Correspondances attendues : URGENT WARNING IMPORTANT OK
//gmu
ExerciseExercice 10 · abbreviations with a periodabréviations avec point intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find the abbreviations made of a capital, possibly some lowercase letters, and a final period (such as "Mr." or "Dr.").
Trouvez les abréviations formées d'une majuscule, de minuscules éventuelles et d'un point final (comme « M. » ou « Dr. »).
Test textTexte de test
The abbreviations Mr., Mrs, Dr. and e.g. are common. Not Mister or Doctor, written out in full.
Les abréviations M., Mme, Dr. et p. ex. sont courantes. Pas Monsieur ni Docteur, écrits au complet.
Expected matches:Correspondances attendues : M. Dr.
Expected matches:Correspondances attendues : Mr. Dr.
//gmu
ExerciseExercice 11 · hyphenated wordsmots avec trait d'union intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find the hyphenated compounds, accents included. The test text stays French: the point is that \w breaks on the accented letters and \p{L} does not.
Trouvez les mots composés avec trait d'union, accents compris.
Test textTexte de test
Les mots peut-être, week-end et après-midi contiennent des traits d'union. Pas peut, être, ni un tiret - seul.
Les mots peut-être, week-end et après-midi contiennent des traits d'union. Pas peut, être, ni un tiret - seul.
Expected matches:Correspondances attendues : peut-être week-end après-midi
Expected matches:Correspondances attendues : peut-être week-end après-midi
//gmu
ExerciseExercice 12 · words starting with a capitalmots commençant par une majuscule intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find the words that start with a capital, accents included in the rest of the word. The test text stays French, because the accent in "Montréal" is what the exercise is about.
Trouvez les mots qui commencent par une majuscule, accents compris dans la suite du mot.
Test textTexte de test
Marie, Pierre et Julie habitent Montréal. Les noms marie et julie en minuscules ne comptent pas.
Marie, Pierre et Julie habitent Montréal. Les noms marie et julie en minuscules ne comptent pas.
Expected matches:Correspondances attendues : Marie Pierre Julie Montréal Les
Expected matches:Correspondances attendues : Marie Pierre Julie Montréal Les
//gmu
Written alternately in EN and FR, translation partly generated in both directions. Rédigé en alternance en EN et en FR, traduction en partie générée dans les deux sens. Updated 2026-08-27
ExerciseExercice 7 · HTML tagsbalises HTML intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find every HTML tag in the fragment, one per match.
Trouvez toutes les balises HTML du fragment, une par correspondance.
Test textTexte de test
<html><head><title>Page</title></head><body><p class="intro">Text</p><br/><input type="text"/></body></html> No tag: 3 > 2 and 1 < 4.
<html><head><title>Page</title></head><body><p class="intro">Texte</p><br/><input type="text"/></body></html> Pas de balise: 3 > 2 et 1 < 4.
Expected matches:Correspondances attendues : <html> <head> <title> </title> </head> <body> <pclass="intro"> </p> <br/> <inputtype="text"/> + 2 more+ 2 autres ␣ space · ⇥ tab · ⏎ line break · ◆ empty match␣ espace · ⇥ tabulation · ⏎ retour à la ligne · ◆ correspondance vide
Expected matches:Correspondances attendues : <html> <head> <title> </title> </head> <body> <pclass="intro"> </p> <br/> <inputtype="text"/> + 2 more+ 2 autres ␣ space · ⇥ tab · ⏎ line break · ◆ empty match␣ espace · ⇥ tabulation · ⏎ retour à la ligne · ◆ correspondance vide
//gmu
ExerciseExercice 8 · social media mentionsmentions de réseaux sociaux basicbasique not startedà faire solvedréussi keep tryingà retravailler
Find the mentions (@ followed by word characters). Look at what happens to the email address: the expression knows nothing about context.
Trouvez les mentions (@ suivi de caractères de mot). Observez le résultat sur l'adresse courriel : la regex ne connaît pas le contexte.
Test textTexte de test
Thanks @john_smith and @mary123 for your help! But not @ on its own or #hashtag. The address test@mail.com gives an unexpected result.
Merci @jean_dupont et @marie123 pour votre aide ! Mais pas @ seul ni #hashtag. L'adresse test@mail.com donne un résultat inattendu.
Expected matches:Correspondances attendues : @jean_dupont @marie123 @mail
Expected matches:Correspondances attendues : @john_smith @mary123 @mail
//gmu
ExerciseExercice 9 · words in capitalsmots en majuscules intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find the words written entirely in capitals, of at least 2 letters.
Trouvez les mots entièrement en majuscules d'au moins 2 lettres.
Test textTexte de test
The words URGENT, WARNING and IMPORTANT are in capitals, OK too. But not Urgent, warning, or I on its own.
Les mots URGENT, ATTENTION et IMPORTANT sont en majuscules, OK aussi. Mais pas Urgent, attention, ni I seul.
Expected matches:Correspondances attendues : URGENT ATTENTION IMPORTANT OK
Expected matches:Correspondances attendues : URGENT WARNING IMPORTANT OK
//gmu
ExerciseExercice 10 · abbreviations with a periodabréviations avec point intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find the abbreviations made of a capital, possibly some lowercase letters, and a final period (such as "Mr." or "Dr.").
Trouvez les abréviations formées d'une majuscule, de minuscules éventuelles et d'un point final (comme « M. » ou « Dr. »).
Test textTexte de test
The abbreviations Mr., Mrs, Dr. and e.g. are common. Not Mister or Doctor, written out in full.
Les abréviations M., Mme, Dr. et p. ex. sont courantes. Pas Monsieur ni Docteur, écrits au complet.
Expected matches:Correspondances attendues : M. Dr.
Expected matches:Correspondances attendues : Mr. Dr.
//gmu
ExerciseExercice 11 · hyphenated wordsmots avec trait d'union intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find the hyphenated compounds, accents included. The test text stays French: the point is that \w breaks on the accented letters and \p{L} does not.
Trouvez les mots composés avec trait d'union, accents compris.
Test textTexte de test
Les mots peut-être, week-end et après-midi contiennent des traits d'union. Pas peut, être, ni un tiret - seul.
Les mots peut-être, week-end et après-midi contiennent des traits d'union. Pas peut, être, ni un tiret - seul.
Expected matches:Correspondances attendues : peut-être week-end après-midi
Expected matches:Correspondances attendues : peut-être week-end après-midi
//gmu
ExerciseExercice 12 · words starting with a capitalmots commençant par une majuscule intermediateintermédiaire not startedà faire solvedréussi keep tryingà retravailler
Find the words that start with a capital, accents included in the rest of the word. The test text stays French, because the accent in "Montréal" is what the exercise is about.
Trouvez les mots qui commencent par une majuscule, accents compris dans la suite du mot.
Test textTexte de test
Marie, Pierre et Julie habitent Montréal. Les noms marie et julie en minuscules ne comptent pas.
Marie, Pierre et Julie habitent Montréal. Les noms marie et julie en minuscules ne comptent pas.
Expected matches:Correspondances attendues : Marie Pierre Julie Montréal Les
Expected matches:Correspondances attendues : Marie Pierre Julie Montréal Les
//gmu
Written alternately in EN and FR, translation partly generated in both directions. Rédigé en alternance en EN et en FR, traduction en partie générée dans les deux sens. Mise à jour 2026-08-30

Spotted an error? Une erreur ?

Language, content, a broken link: tell me what you saw and I will fix it. Langue, contenu, lien brisé : dites-moi ce que vous avez vu et je corrige.

Sending opens your mail app with the report addressed to me. L'envoi ouvre votre application de courriel avec le signalement déjà adressé à moi.