--- title: Symbol.search slug: Web/JavaScript/Reference/Global_Objects/Symbol/search tags: - ECMAScript 2015 - JavaScript - Propriété - Reference - Symbol translation_of: Web/JavaScript/Reference/Global_Objects/Symbol/search original_slug: Web/JavaScript/Reference/Objets_globaux/Symbol/search --- {{JSRef}} Le symbole connu **`Symbol.search`** définit la méthode qui renvoie l'indice indiquant la position d'une correspondance trouvée dans une chaîne de caractères grâce à une expression rationnelle. Cette fonction est appelée par la méthode {{jsxref("String.prototype.search()")}}. Pour plus d'informations, se référer aux pages sur {{jsxref("RegExp.@@search", "RegExp.prototype[@@search]()")}} et {{jsxref("String.prototype.search()")}}. {{EmbedInteractiveExample("pages/js/symbol-search.html")}}{{js_property_attributes(0,0,0)}} ## Spécifications | Spécification | État | Commentaires | | ------------------------------------------------------------------------------------ | ---------------------------- | -------------------- | | {{SpecName('ES2015', '#sec-symbol.search', 'Symbol.search')}} | {{Spec2('ES2015')}} | Définition initiale. | | {{SpecName('ESDraft', '#sec-symbol.search', 'Symbol.search')}} | {{Spec2('ESDraft')}} | | ## Compatibilité des navigateurs {{Compat("javascript.builtins.Symbol.search")}} ## Voir aussi - {{jsxref("Symbol.match")}} - {{jsxref("Symbol.replace")}} - {{jsxref("Symbol.split")}} - {{jsxref("RegExp.@@search", "RegExp.prototype[@@search]()")}}