From 844f5103992238c0c23203286dad16a466e89c97 Mon Sep 17 00:00:00 2001 From: julieng Date: Tue, 3 Aug 2021 08:03:09 +0200 Subject: move *.html to *.md --- .../global_objects/regexp/flags/index.html | 79 ---------------------- 1 file changed, 79 deletions(-) delete mode 100644 files/fr/web/javascript/reference/global_objects/regexp/flags/index.html (limited to 'files/fr/web/javascript/reference/global_objects/regexp/flags/index.html') diff --git a/files/fr/web/javascript/reference/global_objects/regexp/flags/index.html b/files/fr/web/javascript/reference/global_objects/regexp/flags/index.html deleted file mode 100644 index f03a085b92..0000000000 --- a/files/fr/web/javascript/reference/global_objects/regexp/flags/index.html +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: RegExp.prototype.flags -slug: Web/JavaScript/Reference/Global_Objects/RegExp/flags -tags: - - ECMAScript 2015 - - JavaScript - - Propriété - - Prototype - - Reference - - RegExp - - polyfill -translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/flags -original_slug: Web/JavaScript/Reference/Objets_globaux/RegExp/flags ---- -
{{JSRef}}
- -

La propriété flags renvoie une chaîne de caractères contenant les drapeaux (flags) de l'objet {{jsxref("RegExp")}} auquel elle appartient.

- -
{{EmbedInteractiveExample("pages/js/regexp-prototype-flags.html")}}
- - - -
{{js_property_attributes(0, 0, 1)}}
- -

Description

- -

Les drapeaux de la propriété flags sont rangés par ordre alphabétique de gauche à droite.

- -

Exemples

- -

Utiliser flags

- -
/toto/ig.flags;   // "gi"
-/truc/myu.flags;  // "muy"
-
- -

Prothèse d'émulation (polyfill)

- -
if (RegExp.prototype.flags === undefined) {
-  Object.defineProperty(RegExp.prototype, 'flags', {
-    configurable: true,
-    get: function() {
-      return this.toString().match(/[gimuy]*$/)[0];
-    }
-  });
-}
-
- -

Spécifications

- - - - - - - - - - - - - - - - - - - -
SpécificationÉtatCommentaires
{{SpecName('ES2015', '#sec-get-regexp.prototype.flags', 'RegExp.prototype.flags')}}{{Spec2('ES2015')}}Définition initiale.
{{SpecName('ESDraft', '#sec-get-regexp.prototype.flags', 'RegExp.prototype.flags')}}{{Spec2('ESDraft')}} 
- -

Compatibilité des navigateurs

- -

{{Compat("javascript.builtins.RegExp.flags")}}

- -

Voir aussi

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