From bf8e099b9c8b3c60d60b3712b4fc97b052c39887 Mon Sep 17 00:00:00 2001 From: julieng Date: Tue, 3 Aug 2021 08:03:23 +0200 Subject: convert content to md --- .../reference/global_objects/regexp/flags/index.md | 65 ++++++++-------------- 1 file changed, 23 insertions(+), 42 deletions(-) (limited to 'files/fr/web/javascript/reference/global_objects/regexp/flags') diff --git a/files/fr/web/javascript/reference/global_objects/regexp/flags/index.md b/files/fr/web/javascript/reference/global_objects/regexp/flags/index.md index f03a085b92..1bea14f02d 100644 --- a/files/fr/web/javascript/reference/global_objects/regexp/flags/index.md +++ b/files/fr/web/javascript/reference/global_objects/regexp/flags/index.md @@ -12,31 +12,29 @@ tags: translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/flags original_slug: Web/JavaScript/Reference/Objets_globaux/RegExp/flags --- -
{{JSRef}}
+{{JSRef}} -

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

+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")}}
+{{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. -
{{js_property_attributes(0, 0, 1)}}
+## Exemples -

Description

+### Utiliser `flags` -

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

- -

Exemples

- -

Utiliser flags

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

Prothèse d'émulation (polyfill)

+## Prothèse d'émulation (_polyfill_) -
if (RegExp.prototype.flags === undefined) {
+```js
+if (RegExp.prototype.flags === undefined) {
   Object.defineProperty(RegExp.prototype, 'flags', {
     configurable: true,
     get: function() {
@@ -44,36 +42,19 @@ original_slug: Web/JavaScript/Reference/Objets_globaux/RegExp/flags
     }
   });
 }
-
+``` -

Spécifications

+## 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')}} 
+| Spécification | État | Commentaires | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------- | -------------------- | +| {{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

+## Compatibilité des navigateurs -

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

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

Voir aussi

+## Voir aussi - +- {{jsxref("RegExp.prototype.source")}} -- cgit v1.2.3-54-g00ecf