From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- .../global_objects/symbol/matchall/index.html | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 files/fr/web/javascript/reference/global_objects/symbol/matchall/index.html (limited to 'files/fr/web/javascript/reference/global_objects/symbol/matchall') diff --git a/files/fr/web/javascript/reference/global_objects/symbol/matchall/index.html b/files/fr/web/javascript/reference/global_objects/symbol/matchall/index.html new file mode 100644 index 0000000000..93b8428c10 --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/symbol/matchall/index.html @@ -0,0 +1,67 @@ +--- +title: Symbol.matchAll +slug: Web/JavaScript/Reference/Objets_globaux/Symbol/matchAll +tags: + - JavaScript + - Propriété + - Reference + - Symbol +translation_of: Web/JavaScript/Reference/Global_Objects/Symbol/matchAll +--- +
{{JSRef}}
+ +

Le symbole connu Symbol.matchAll renvoie un itérateur qui fournit l'ensemble des correspondances entre une expression rationnelle et une chaîne de caractères. Cette fonction est implicitement appelée par la méthode {{jsxref("String.prototype.matchAll()")}}.

+ +
{{EmbedInteractiveExample("pages/js/symbol-matchall.html")}}
+ + + +

Description

+ +
+

Ce symbole est utilisé par {{jsxref("String.prototype.matchAll()")}} et plus particulièrement par {{jsxref("RegExp.@@matchAll", "RegExp.prototype[@@matchAll]()")}}. Les deux lignes qui suivent renverront le même résultat :

+ +
'abc'.matchAll(/a/);
+
+/a/[Symbol.matchAll]('abc');
+ +

Cette méthode existe afin de personnaliser le comportement des correspondances pour les sous-classes de {{jsxref("RegExp")}}.

+ +

{{js_property_attributes(0,0,0)}}

+
+ +

Exemples

+ +

Voir les pages {{jsxref("String.prototype.matchAll()")}} et {{jsxref("RegExp.@@matchAll", "RegExp.prototype[@@matchAll]()")}} pour plus d'exemples.

+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('ESDraft', '#sec-symbol.matchall', 'Symbol.matchAll')}}{{Spec2('ESDraft')}} 
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("javascript.builtins.Symbol.matchAll")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf