1
0
Fork 0
python-docs-fr/library/re.po

2725 lines
121 KiB
Plaintext
Raw Normal View History

2018-07-04 09:06:45 +00:00
# Copyright (C) 2001-2018, Python Software Foundation
2018-07-04 09:08:42 +00:00
# For licence information, see README file.
2016-10-30 09:46:26 +00:00
msgid ""
msgstr ""
2019-12-05 22:15:54 +00:00
"Project-Id-Version: Python 3\n"
2016-10-30 09:46:26 +00:00
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-01-15 22:33+0100\n"
"PO-Revision-Date: 2023-03-05 23:22+0100\n"
"Last-Translator: Mouna Sebti <mounasb@proton.me>\n"
2018-07-04 09:14:25 +00:00
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
2017-05-23 22:40:56 +00:00
"Language: fr\n"
2016-10-30 09:46:26 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.2.1\n"
2016-10-30 09:46:26 +00:00
#: library/re.rst:2
2016-10-30 09:46:26 +00:00
msgid ":mod:`re` --- Regular expression operations"
msgstr ":mod:`re` — Opérations à base d'expressions rationnelles"
2016-10-30 09:46:26 +00:00
#: library/re.rst:10
2022-05-22 21:15:02 +00:00
msgid "**Source code:** :source:`Lib/re/`"
msgstr "**Code source :** :source:`Lib/re/`"
2016-10-30 09:46:26 +00:00
#: library/re.rst:14
2016-10-30 09:46:26 +00:00
msgid ""
"This module provides regular expression matching operations similar to those "
"found in Perl."
msgstr ""
2017-09-22 15:50:23 +00:00
"Ce module fournit des opérations sur les expressions rationnelles similaires "
"à celles que l'on trouve dans Perl."
2016-10-30 09:46:26 +00:00
#: library/re.rst:17
2016-10-30 09:46:26 +00:00
msgid ""
2017-12-01 06:48:13 +00:00
"Both patterns and strings to be searched can be Unicode strings (:class:"
"`str`) as well as 8-bit strings (:class:`bytes`). However, Unicode strings "
"and 8-bit strings cannot be mixed: that is, you cannot match a Unicode "
"string with a byte pattern or vice-versa; similarly, when asking for a "
"substitution, the replacement string must be of the same type as both the "
"pattern and the search string."
msgstr ""
2017-09-22 15:50:23 +00:00
"Les motifs, comme les chaînes, à analyser peuvent aussi bien être des "
2018-01-28 23:44:26 +00:00
"chaînes Unicode (:class:`str`) que des chaînes 8-bits (:class:`bytes`). "
"Cependant, les chaînes Unicode et 8-bits ne peuvent pas être mélangées : "
"cest à dire que vous ne pouvez pas analyser une chaîne Unicode avec un "
"motif 8-bit, et inversement ; de même, lors d'une substitution, la chaîne de "
"remplacement doit être du même type que le motif et la chaîne analysée."
2016-10-30 09:46:26 +00:00
#: library/re.rst:24
2016-10-30 09:46:26 +00:00
msgid ""
"Regular expressions use the backslash character (``'\\'``) to indicate "
"special forms or to allow special characters to be used without invoking "
"their special meaning. This collides with Python's usage of the same "
"character for the same purpose in string literals; for example, to match a "
"literal backslash, one might have to write ``'\\\\\\\\'`` as the pattern "
"string, because the regular expression must be ``\\\\``, and each backslash "
2019-09-04 09:35:23 +00:00
"must be expressed as ``\\\\`` inside a regular Python string literal. Also, "
"please note that any invalid escape sequences in Python's usage of the "
"backslash in string literals now generate a :exc:`DeprecationWarning` and in "
"the future this will become a :exc:`SyntaxError`. This behaviour will happen "
"even if it is a valid escape sequence for a regular expression."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-27 14:30:14 +00:00
"Les expressions rationnelles utilisent le caractère *backslash* (``'\\'``) "
"pour indiquer des formes spéciales ou permettre d'utiliser des caractères "
2017-09-22 15:50:23 +00:00
"spéciaux sans en invoquer le sens. Cela entre en conflit avec l'utilisation "
2017-05-27 14:30:14 +00:00
"en Python du même caractère pour la même raison dans les chaînes "
"littérales ; par exemple, pour rechercher un *backslash* littéral il "
"faudrait écrire ``'\\\\\\\\'`` comme motif, parce que l'expression "
2017-09-22 15:50:23 +00:00
"rationnelle devrait être ``\\\\`` et chaque *backslash* doit être représenté "
"par ``\\\\`` au sein des chaînes littérales Python. Notez aussi qu'une "
"séquence d'échappement invalide en raison de l'utilisation de *backslash* au "
"sens de Python dans une chaîne littérale lève un :exc:`DeprecationWarning` "
"qui, dans le futur, deviendra une :exc:`SyntaxError`. Ceci se produit même "
"si la séquence d'échappement est valide en tant qu'expression régulière."
2016-10-30 09:46:26 +00:00
#: library/re.rst:36
2016-10-30 09:46:26 +00:00
msgid ""
"The solution is to use Python's raw string notation for regular expression "
"patterns; backslashes are not handled in any special way in a string literal "
"prefixed with ``'r'``. So ``r\"\\n\"`` is a two-character string containing "
"``'\\'`` and ``'n'``, while ``\"\\n\"`` is a one-character string containing "
"a newline. Usually patterns will be expressed in Python code using this raw "
"string notation."
msgstr ""
2017-05-27 14:30:14 +00:00
"La solution est d'utiliser la notation des chaînes brutes en Python pour les "
2017-09-22 15:50:23 +00:00
"expressions rationnelles ; Les *backslashs* ne provoquent aucun traitement "
"spécifique dans les chaînes littérales préfixées par ``'r'``. Ainsi, "
"``r\"\\n\"`` est une chaîne de deux caractères contenant ``'\\'`` et "
"``'n'``, tandis que ``\"\\n\"`` est une chaîne contenant un unique "
"caractère : un saut de ligne. Généralement, les motifs seront exprimés en "
"Python à l'aide de chaînes brutes."
2016-10-30 09:46:26 +00:00
#: library/re.rst:43
2016-10-30 09:46:26 +00:00
msgid ""
"It is important to note that most regular expression operations are "
"available as module-level functions and methods on :ref:`compiled regular "
"expressions <re-objects>`. The functions are shortcuts that don't require "
"you to compile a regex object first, but miss some fine-tuning parameters."
msgstr ""
2017-05-27 14:30:14 +00:00
"Il est important de noter que la plupart des opérations sur les expressions "
"rationnelles sont disponibles comme fonctions au niveau du module et comme "
2017-09-22 15:50:23 +00:00
"méthodes des :ref:`expressions rationnelles compilées <re-objects>`. Les "
2017-05-27 14:30:14 +00:00
"fonctions sont des raccourcis qui ne vous obligent pas à d'abord compiler un "
"objet *regex*, mais auxquelles manquent certains paramètres de configuration "
"fine."
2016-10-30 09:46:26 +00:00
#: library/re.rst:51
2017-04-02 20:14:06 +00:00
msgid ""
2018-06-10 09:32:30 +00:00
"The third-party `regex <https://pypi.org/project/regex/>`_ module, which has "
"an API compatible with the standard library :mod:`re` module, but offers "
2017-04-02 20:14:06 +00:00
"additional functionality and a more thorough Unicode support."
msgstr ""
2018-06-10 13:37:51 +00:00
"Le module tiers `regex <https://pypi.org/project/regex/>`_, dont l'interface "
"est compatible avec le module :mod:`re` de la bibliothèque standard, mais "
"offre des fonctionnalités additionnelles et une meilleure gestion de "
"l'Unicode."
2017-04-02 20:14:06 +00:00
#: library/re.rst:59
2016-10-30 09:46:26 +00:00
msgid "Regular Expression Syntax"
msgstr "Syntaxe des expressions rationnelles"
2016-10-30 09:46:26 +00:00
#: library/re.rst:61
2016-10-30 09:46:26 +00:00
msgid ""
"A regular expression (or RE) specifies a set of strings that matches it; the "
"functions in this module let you check if a particular string matches a "
"given regular expression (or if a given regular expression matches a "
"particular string, which comes down to the same thing)."
msgstr ""
2017-05-27 14:30:14 +00:00
"Une expression rationnelle (*regular expression* ou *RE*) spécifie un "
"ensemble de chaînes de caractères qui lui correspondent ; les fonctions de "
"ce module vous permettent de vérifier si une chaîne particulière correspond "
"à une expression rationnelle donnée (ou si un expression rationnelle donnée "
"correspond à une chaîne particulière, ce qui revient à la même chose)."
2016-10-30 09:46:26 +00:00
#: library/re.rst:66
2016-10-30 09:46:26 +00:00
msgid ""
"Regular expressions can be concatenated to form new regular expressions; if "
"*A* and *B* are both regular expressions, then *AB* is also a regular "
"expression. In general, if a string *p* matches *A* and another string *q* "
"matches *B*, the string *pq* will match AB. This holds unless *A* or *B* "
"contain low precedence operations; boundary conditions between *A* and *B*; "
"or have numbered group references. Thus, complex expressions can easily be "
"constructed from simpler primitive expressions like the ones described "
"here. For details of the theory and implementation of regular expressions, "
2018-04-28 22:28:01 +00:00
"consult the Friedl book [Frie09]_, or almost any textbook about compiler "
"construction."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-27 14:30:14 +00:00
"Les expressions rationnelles peuvent être concaténées pour former de "
"nouvelles expressions : si *A* et *B* sont deux expressions rationnelles, "
"alors *AB* est aussi une expression rationnelle. En général, si une chaîne "
"*p* valide *A* et qu'une autre chaîne *q* valide *B*, la chaîne *pq* "
"validera AB. Cela est vrai tant que *A* et *B* ne contiennent pas "
2017-09-22 15:50:23 +00:00
"d'opérations de priorité ; de conditions de frontière entre *A* et *B* ; ou "
"de références vers des groupes numérotés. Ainsi, des expressions complexes "
2017-05-27 14:30:14 +00:00
"peuvent facilement être construites depuis de plus simples expressions "
2017-09-22 15:50:23 +00:00
"primitives comme celles décrites ici. Pour plus de détails sur la théorie et "
"l'implémentation des expressions rationnelles, consultez le livre de Friedl "
2018-05-08 18:27:09 +00:00
"[Frie09]_, ou à peu près n'importe quel livre dédié à la construction de "
"compilateurs."
2016-10-30 09:46:26 +00:00
#: library/re.rst:76
2016-10-30 09:46:26 +00:00
msgid ""
"A brief explanation of the format of regular expressions follows. For "
"further information and a gentler presentation, consult the :ref:`regex-"
"howto`."
msgstr ""
2017-09-22 15:50:23 +00:00
"Une brève explication sur le format des expressions rationnelles suit. Pour "
"de plus amples informations et une présentation plus simple, référez-vous "
"au :ref:`regex-howto`."
2016-10-30 09:46:26 +00:00
#: library/re.rst:79
2016-10-30 09:46:26 +00:00
msgid ""
"Regular expressions can contain both special and ordinary characters. Most "
"ordinary characters, like ``'A'``, ``'a'``, or ``'0'``, are the simplest "
"regular expressions; they simply match themselves. You can concatenate "
"ordinary characters, so ``last`` matches the string ``'last'``. (In the "
"rest of this section, we'll write RE's in ``this special style``, usually "
"without quotes, and strings to be matched ``'in single quotes'``.)"
msgstr ""
2017-05-27 14:30:14 +00:00
"Les expressions rationnelles peuvent contenir à la fois des caractères "
"spéciaux et ordinaires. Les plus ordinaires, comme ``'A'``, ``'a'`` ou "
"``'0'`` sont les expressions rationnelles les plus simples : elles "
2017-09-22 15:50:23 +00:00
"correspondent simplement à elles-mêmes. Vous pouvez concaténer des "
"caractères ordinaires, ainsi ``last`` correspond à la chaîne ``'last'``. "
2017-05-27 14:30:14 +00:00
"(Dans la suite de cette section, nous écrirons les expressions rationnelles "
"dans ``ce style spécifique``, généralement sans guillemets, et les chaînes à "
"tester ``'entourées de simples guillemets'``.)"
2016-10-30 09:46:26 +00:00
#: library/re.rst:86
2016-10-30 09:46:26 +00:00
msgid ""
"Some characters, like ``'|'`` or ``'('``, are special. Special characters "
"either stand for classes of ordinary characters, or affect how the regular "
2017-12-01 06:48:13 +00:00
"expressions around them are interpreted."
msgstr ""
"Certains caractères, comme ``'|'`` ou ``'('``, sont spéciaux. Des caractères "
"spéciaux peuvent aussi exister pour les classes de caractères ordinaires, ou "
"affecter comment les expressions rationnelles autour d'eux seront "
"interprétées."
2016-10-30 09:46:26 +00:00
#: library/re.rst:90
2016-10-30 09:46:26 +00:00
msgid ""
2022-03-23 17:40:12 +00:00
"Repetition operators or quantifiers (``*``, ``+``, ``?``, ``{m,n}``, etc) "
"cannot be directly nested. This avoids ambiguity with the non-greedy "
"modifier suffix ``?``, and with other modifiers in other implementations. To "
"apply a second repetition to an inner repetition, parentheses may be used. "
"For example, the expression ``(?:a{6})*`` matches any multiple of six "
"``'a'`` characters."
2016-10-30 09:46:26 +00:00
msgstr ""
"Les caractères de répétition ou quantificateurs (``*``, ``+``, ``?``, ``{m,n}"
"``, etc.) ne peuvent être directement imbriqués. Cela empêche l'ambiguïté "
"avec le suffixe modificateur non gourmand ``?`` et avec les autres "
"modificateurs dans d'autres implémentations. Pour appliquer une seconde "
"répétition à une première, des parenthèses peuvent être utilisées. Par "
"exemple, l'expression ``(?:a{6})*`` valide toutes les chaînes composées d'un "
"nombre de caractères ``'a'`` multiple de six."
2016-10-30 09:46:26 +00:00
#: library/re.rst:97
2016-10-30 09:46:26 +00:00
msgid "The special characters are:"
2017-05-27 14:30:14 +00:00
msgstr "Les caractères spéciaux sont :"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1525
2017-12-01 06:48:13 +00:00
msgid "``.``"
msgstr "``.``"
2016-10-30 09:46:26 +00:00
#: library/re.rst:102
2016-10-30 09:46:26 +00:00
msgid ""
"(Dot.) In the default mode, this matches any character except a newline. "
"If the :const:`DOTALL` flag has been specified, this matches any character "
"including a newline."
msgstr ""
2017-09-22 15:50:23 +00:00
"(Point.) Dans le mode par défaut, il valide tout caractère à l'exception du "
"saut de ligne. Si l'option :const:`DOTALL` a été spécifiée, il valide tout "
2017-05-27 14:30:14 +00:00
"caractère, saut de ligne compris."
2016-10-30 09:46:26 +00:00
#: library/re.rst:110
2017-12-01 06:48:13 +00:00
msgid "``^``"
msgstr "``^``"
2017-12-01 06:48:13 +00:00
#: library/re.rst:109
2016-10-30 09:46:26 +00:00
msgid ""
"(Caret.) Matches the start of the string, and in :const:`MULTILINE` mode "
"also matches immediately after each newline."
msgstr ""
2017-09-22 15:50:23 +00:00
"(Accent circonflexe.) Valide le début d'une chaîne de caractères, ainsi que "
2017-05-27 14:30:14 +00:00
"ce qui suit chaque saut de ligne en mode :const:`MULTILINE`."
2016-10-30 09:46:26 +00:00
#: library/re.rst:121
2017-12-01 06:48:13 +00:00
msgid "``$``"
msgstr "``$``"
2016-10-30 09:46:26 +00:00
#: library/re.rst:115
2016-10-30 09:46:26 +00:00
msgid ""
"Matches the end of the string or just before the newline at the end of the "
"string, and in :const:`MULTILINE` mode also matches before a newline. "
"``foo`` matches both 'foo' and 'foobar', while the regular expression "
"``foo$`` matches only 'foo'. More interestingly, searching for ``foo.$`` in "
2016-10-30 09:46:26 +00:00
"``'foo1\\nfoo2\\n'`` matches 'foo2' normally, but 'foo1' in :const:"
"`MULTILINE` mode; searching for a single ``$`` in ``'foo\\n'`` will find two "
"(empty) matches: one just before the newline, and one at the end of the "
"string."
msgstr ""
2017-05-27 14:30:14 +00:00
"Valide la fin d'une chaîne de caractères, ou juste avant le saut de ligne à "
"la fin de la chaîne, ainsi qu'avant chaque saut de ligne en mode :const:"
"`MULTILINE`. ``foo`` valide à la fois *foo* et *foobar*, tandis que "
"l'expression rationnelle ``foo$`` ne correspond qu'à ``'foo'``. Plus "
2017-05-27 14:30:14 +00:00
"intéressant, chercher ``foo.$`` dans ``'foo1\\nfoo2\\n'`` trouve normalement "
"``'foo2'``, mais ``'foo1'`` en mode :const:`MULTILINE` ; chercher un simple "
"``$`` dans ``'foo\\n'`` trouvera deux correspondances (vides) : une juste "
"avant le saut de ligne, et une à la fin de la chaîne."
2016-10-30 09:46:26 +00:00
#: library/re.rst:128
2017-12-01 06:48:13 +00:00
msgid "``*``"
msgstr "``*``"
2016-10-30 09:46:26 +00:00
#: library/re.rst:126
2016-10-30 09:46:26 +00:00
msgid ""
"Causes the resulting RE to match 0 or more repetitions of the preceding RE, "
"as many repetitions as are possible. ``ab*`` will match 'a', 'ab', or 'a' "
"followed by any number of 'b's."
msgstr ""
2017-09-22 15:50:23 +00:00
"Fait valider par l'expression rationnelle résultante 0 répétition ou plus de "
"l'expression qui précède, avec autant de répétitions que possible. ``ab*`` "
"validera 'a', 'ab' ou 'a' suivi de n'importe quel nombre de 'b'."
2016-10-30 09:46:26 +00:00
#: library/re.rst:135
2017-12-01 06:48:13 +00:00
msgid "``+``"
msgstr "``+``"
2016-10-30 09:46:26 +00:00
#: library/re.rst:133
2016-10-30 09:46:26 +00:00
msgid ""
"Causes the resulting RE to match 1 or more repetitions of the preceding RE. "
"``ab+`` will match 'a' followed by any non-zero number of 'b's; it will not "
"match just 'a'."
msgstr ""
2017-09-22 15:50:23 +00:00
"Fait valider par l'expression rationnelle résultante 1 répétition ou plus de "
"l'expression qui précède. ``ab+`` validera 'a' suivi de n'importe quel "
"nombre non nul de 'b' ; cela ne validera pas la chaîne 'a'."
2016-10-30 09:46:26 +00:00
#: library/re.rst:141
2017-12-01 06:48:13 +00:00
msgid "``?``"
msgstr "``?``"
2017-12-01 06:48:13 +00:00
#: library/re.rst:140
2016-10-30 09:46:26 +00:00
msgid ""
"Causes the resulting RE to match 0 or 1 repetitions of the preceding RE. "
"``ab?`` will match either 'a' or 'ab'."
msgstr ""
2017-09-22 15:50:23 +00:00
"Fait valider par l'expression rationnelle résultante 0 ou 1 répétition de "
"l'expression qui précède. ``ab?`` correspondra à 'a' ou 'ab'."
2016-10-30 09:46:26 +00:00
#: library/re.rst:155
2016-10-30 09:46:26 +00:00
msgid "``*?``, ``+?``, ``??``"
msgstr "``*?``, ``+?``, ``??``"
#: library/re.rst:149
2016-10-30 09:46:26 +00:00
msgid ""
2022-03-23 17:40:12 +00:00
"The ``'*'``, ``'+'``, and ``'?'`` quantifiers are all :dfn:`greedy`; they "
2016-10-30 09:46:26 +00:00
"match as much text as possible. Sometimes this behaviour isn't desired; if "
2017-12-01 06:48:13 +00:00
"the RE ``<.*>`` is matched against ``'<a> b <c>'``, it will match the entire "
2022-03-23 17:40:12 +00:00
"string, and not just ``'<a>'``. Adding ``?`` after the quantifier makes it "
2016-10-30 09:46:26 +00:00
"perform the match in :dfn:`non-greedy` or :dfn:`minimal` fashion; as *few* "
"characters as possible will be matched. Using the RE ``<.*?>`` will match "
2017-12-01 06:48:13 +00:00
"only ``'<a>'``."
msgstr ""
"Les quantificateurs ``'*'``, ``'+'`` et ``'?'`` sont tous :dfn:`greedy` "
"(gourmands) ; ils valident autant de texte que possible. Parfois ce "
"comportement n'est pas désiré ; si l'expression rationnelle ``<.*>`` est "
"testée avec la chaîne ``'<a> b <c>'``, cela correspondra à la chaîne "
"entière, et non juste à ``'<a>'``. Ajouter ``?`` derrière le quantificateur "
"lui fait réaliser l'opération de façon :dfn:`non-greedy` (ou :dfn:"
"`minimal`) ; le *moins* de caractères possibles seront validés. Utiliser "
"l'expression rationnelle ``<.*?>`` validera uniquement ``'<a>'``."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:179
msgid "``*+``, ``++``, ``?+``"
msgstr "``*+``, ``++``, ``?+``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:163
2022-03-23 17:40:12 +00:00
msgid ""
"Like the ``'*'``, ``'+'``, and ``'?'`` quantifiers, those where ``'+'`` is "
"appended also match as many times as possible. However, unlike the true "
"greedy quantifiers, these do not allow back-tracking when the expression "
"following it fails to match. These are known as :dfn:`possessive` "
"quantifiers. For example, ``a*a`` will match ``'aaaa'`` because the ``a*`` "
2022-05-22 21:15:02 +00:00
"will match all 4 ``'a'``\\ s, but, when the final ``'a'`` is encountered, "
"the expression is backtracked so that in the end the ``a*`` ends up matching "
"3 ``'a'``\\ s total, and the fourth ``'a'`` is matched by the final ``'a'``. "
2022-03-23 17:40:12 +00:00
"However, when ``a*+a`` is used to match ``'aaaa'``, the ``a*+`` will match "
"all 4 ``'a'``, but when the final ``'a'`` fails to find any more characters "
"to match, the expression cannot be backtracked and will thus fail to match. "
"``x*+``, ``x++`` and ``x?+`` are equivalent to ``(?>x*)``, ``(?>x+)`` and "
2022-05-22 21:15:02 +00:00
"``(?>x?)`` correspondingly."
2022-03-23 17:40:12 +00:00
msgstr ""
#: library/re.rst:187
2016-10-30 09:46:26 +00:00
msgid "``{m}``"
msgstr "``{m}``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:185
2016-10-30 09:46:26 +00:00
msgid ""
"Specifies that exactly *m* copies of the previous RE should be matched; "
"fewer matches cause the entire RE not to match. For example, ``a{6}`` will "
"match exactly six ``'a'`` characters, but not five."
msgstr ""
2017-05-27 14:30:14 +00:00
"Spécifie qu'exactement *m* copies de l'expression rationnelle qui précède "
"devront être validées ; un nombre plus faible de correspondances empêche "
2017-09-22 15:50:23 +00:00
"l'expression entière de correspondre. Par exemple, ``a{6}`` correspondra "
2017-05-27 14:30:14 +00:00
"exactement à six caractères ``'a'``, mais pas à cinq."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:196
2016-10-30 09:46:26 +00:00
msgid "``{m,n}``"
msgstr "``{m,n}``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:190
2016-10-30 09:46:26 +00:00
msgid ""
"Causes the resulting RE to match from *m* to *n* repetitions of the "
"preceding RE, attempting to match as many repetitions as possible. For "
"example, ``a{3,5}`` will match from 3 to 5 ``'a'`` characters. Omitting *m* "
"specifies a lower bound of zero, and omitting *n* specifies an infinite "
2017-12-01 06:48:13 +00:00
"upper bound. As an example, ``a{4,}b`` will match ``'aaaab'`` or a thousand "
"``'a'`` characters followed by a ``'b'``, but not ``'aaab'``. The comma may "
"not be omitted or the modifier would be confused with the previously "
"described form."
msgstr ""
2017-09-22 15:50:23 +00:00
"Fait valider par l'expression rationnelle résultante entre *m* et *n* "
"répétitions de l'expression qui précède, cherchant à en valider le plus "
"possible. Par exemple, ``a{3,5}`` validera entre 3 et 5 caractères "
"``'a'``. Omettre *m* revient à spécifier 0 comme borne inférieure, et "
"omettre *n* à avoir une borne supérieure infinie. Par exemple, ``a{4,}b`` "
"correspondra à ``'aaaab'`` ou à un millier de caractères ``'a'`` suivis d'un "
"``'b'``, mais pas à ``'aaab'``. La virgule ne doit pas être omise, auquel "
"cas le modificateur serait confondu avec la forme décrite précédemment."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:203
2016-10-30 09:46:26 +00:00
msgid "``{m,n}?``"
msgstr "``{m,n}?``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:199
2016-10-30 09:46:26 +00:00
msgid ""
"Causes the resulting RE to match from *m* to *n* repetitions of the "
"preceding RE, attempting to match as *few* repetitions as possible. This is "
2022-03-23 17:40:12 +00:00
"the non-greedy version of the previous quantifier. For example, on the 6-"
2016-10-30 09:46:26 +00:00
"character string ``'aaaaaa'``, ``a{3,5}`` will match 5 ``'a'`` characters, "
"while ``a{3,5}?`` will only match 3 characters."
msgstr ""
"Fait valider l'expression rationnelle résultante entre *m* et *n* "
2017-05-27 14:30:14 +00:00
"répétitions de l'expression qui précède, cherchant à en valider le moins "
"possible. Il s'agit de la version non gourmande du précédent quantificateur. "
2017-09-22 15:50:23 +00:00
"Par exemple, dans la chaîne de 6 caractères ``'aaaaaa'``, ``a{3,5}`` "
"trouvera 5 caractères ``'a'``, alors que ``a{3,5}?`` n'en trouvera que 3."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:218
msgid "``{m,n}+``"
msgstr "``{m,n}+``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:206
#, fuzzy
msgid ""
"Causes the resulting RE to match from *m* to *n* repetitions of the "
"preceding RE, attempting to match as many repetitions as possible *without* "
"establishing any backtracking points. This is the possessive version of the "
"quantifier above. For example, on the 6-character string ``'aaaaaa'``, "
"``a{3,5}+aa`` attempt to match 5 ``'a'`` characters, then, requiring 2 more "
2022-05-22 21:15:02 +00:00
"``'a'``\\ s, will need more characters than available and thus fail, while "
"``a{3,5}aa`` will match with ``a{3,5}`` capturing 5, then 4 ``'a'``\\ s by "
"backtracking and then the final 2 ``'a'``\\ s are matched by the final "
"``aa`` in the pattern. ``x{m,n}+`` is equivalent to ``(?>x{m,n})``."
2022-03-23 17:40:12 +00:00
msgstr ""
"Fait valider par l'expression rationnelle résultante entre *m* et *n* "
"répétitions de l'expression qui précède, cherchant à en valider le moins "
"possible. Il s'agit de la version non gourmande du précédent quantificateur. "
2022-03-23 17:40:12 +00:00
"Par exemple, dans la chaîne de 6 caractères ``'aaaaaa'``, ``a{3,5}`` "
"trouvera 5 caractères ``'a'``, alors que ``a{3,5}?`` n'en trouvera que 3."
#: library/re.rst:233
2017-12-01 06:48:13 +00:00
msgid "``\\``"
msgstr "``\\``"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:223
2016-10-30 09:46:26 +00:00
msgid ""
"Either escapes special characters (permitting you to match characters like "
"``'*'``, ``'?'``, and so forth), or signals a special sequence; special "
"sequences are discussed below."
msgstr ""
2017-09-22 15:50:23 +00:00
"Échappe les caractères spéciaux (permettant didentifier des caractères "
"comme ``'*'``, ``'?'`` et autres) ou signale une séquence spéciale ; les "
"séquences spéciales sont décrites ci-dessous."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:227
2016-10-30 09:46:26 +00:00
msgid ""
"If you're not using a raw string to express the pattern, remember that "
"Python also uses the backslash as an escape sequence in string literals; if "
"the escape sequence isn't recognized by Python's parser, the backslash and "
"subsequent character are included in the resulting string. However, if "
"Python would recognize the resulting sequence, the backslash should be "
"repeated twice. This is complicated and hard to understand, so it's highly "
"recommended that you use raw strings for all but the simplest expressions."
msgstr ""
2017-05-27 14:30:14 +00:00
"Si vous n'utilisez pas de chaînes brutes pour exprimer le motif, souvenez-"
"vous que Python utilise aussi le *backslash* comme une séquence "
"d'échappement dans les chaînes littérales ; si la séquence d'échappement "
"n'est pas reconnue par l'interpréteur Python, le *backslash* et les "
"caractères qui le suivent sont inclus dans la chaîne renvoyée. Cependant, si "
"Python reconnait la séquence, le *backslash* doit être doublé (pour ne plus "
"être reconnu). C'est assez compliqué et difficile à comprendre, c'est "
"pourquoi il est hautement recommandé d'utiliser des chaînes brutes pour tout "
"sauf les expressions les plus simples."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:293
2016-10-30 09:46:26 +00:00
msgid "``[]``"
msgstr "``[]``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:239
2016-10-30 09:46:26 +00:00
msgid "Used to indicate a set of characters. In a set:"
2017-09-22 15:50:23 +00:00
msgstr "Utilisé pour indiquer un ensemble de caractères. Dans un ensemble :"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:241
2016-10-30 09:46:26 +00:00
msgid ""
"Characters can be listed individually, e.g. ``[amk]`` will match ``'a'``, "
"``'m'``, or ``'k'``."
msgstr ""
2017-05-27 14:30:14 +00:00
"Les caractères peuvent être listés individuellement, e.g. ``[amk]`` "
"correspondra à ``'a'``, ``'m'`` ou ``'k'``."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:246
2016-10-30 09:46:26 +00:00
msgid ""
"Ranges of characters can be indicated by giving two characters and "
"separating them by a ``'-'``, for example ``[a-z]`` will match any lowercase "
"ASCII letter, ``[0-5][0-9]`` will match all the two-digits numbers from "
"``00`` to ``59``, and ``[0-9A-Fa-f]`` will match any hexadecimal digit. If "
"``-`` is escaped (e.g. ``[a\\-z]``) or if it's placed as the first or last "
2017-12-01 06:48:13 +00:00
"character (e.g. ``[-a]`` or ``[a-]``), it will match a literal ``'-'``."
msgstr ""
"Des intervalles de caractères peuvent être indiqués en donnant deux "
"caractères et les séparant par un ``'-'``, par exemple ``[a-z]`` "
"correspondra à toute lettre minuscule *ASCII*, ``[0-5][0-9]`` à tous nombres "
"de deux chiffres entre ``00`` et ``59``, et ``[0-9A-Fa-f]`` correspondra à "
"n'importe quel chiffre hexadécimal. Si ``'-'`` est échappé (``[a\\-z]``) ou "
"s'il est placé comme premier ou dernier caractère (e.g. ``[-a]`` ou "
"``[a-]``), il correspondra à un ``'-'`` littéral."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:253
2016-10-30 09:46:26 +00:00
msgid ""
"Special characters lose their special meaning inside sets. For example, "
"``[(+*)]`` will match any of the literal characters ``'('``, ``'+'``, "
"``'*'``, or ``')'``."
msgstr ""
2017-09-22 15:50:23 +00:00
"Les caractères spéciaux perdent leur sens à l'intérieur des ensembles. Par "
2017-05-27 14:30:14 +00:00
"exemple, ``[(+*)]`` validera chacun des caractères littéraux ``'('``, "
"``'+'``, ``'*'`` ou ``')'``."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:259
2016-10-30 09:46:26 +00:00
msgid ""
"Character classes such as ``\\w`` or ``\\S`` (defined below) are also "
"accepted inside a set, although the characters they match depends on "
"whether :const:`ASCII` or :const:`LOCALE` mode is in force."
msgstr ""
2017-05-27 14:30:14 +00:00
"Les classes de caractères telles que ``\\w`` ou ``\\S`` (définies ci-"
"dessous) sont aussi acceptées à l'intérieur d'un ensemble, bien que les "
"caractères correspondant dépendent de quel mode est actif entre :const:"
"`ASCII` et :const:`LOCALE`."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:265
2016-10-30 09:46:26 +00:00
msgid ""
"Characters that are not within a range can be matched by :dfn:"
"`complementing` the set. If the first character of the set is ``'^'``, all "
"the characters that are *not* in the set will be matched. For example, "
"``[^5]`` will match any character except ``'5'``, and ``[^^]`` will match "
"any character except ``'^'``. ``^`` has no special meaning if it's not the "
"first character in the set."
msgstr ""
2017-05-27 14:30:14 +00:00
"Les caractères qui ne sont pas dans un intervalle peuvent être trouvés avec "
2017-09-22 15:50:23 +00:00
"l'ensemble complémentaire (:dfn:`complementing`). Si le premier caractère de "
"l'ensemble est ``'^'``, tous les caractères qui *ne sont pas* dans "
"l'ensemble seront validés. Par exemple, ``[^5]`` correspondra à tout "
"caractère autre que ``'5'`` et ``[^^]`` validera n'importe quel caractère "
"excepté ``'^'``. ``^`` n'a pas de sens particulier s'il n'est pas le premier "
"caractère de l'ensemble."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:272
2016-10-30 09:46:26 +00:00
msgid ""
"To match a literal ``']'`` inside a set, precede it with a backslash, or "
"place it at the beginning of the set. For example, both ``[()[\\]{}]`` and "
"``[]()[{}]`` will both match a parenthesis."
msgstr ""
2017-05-27 14:30:14 +00:00
"Pour insérer un ``']'`` littéral dans un ensemble, il faut le précéder d'un "
2017-09-22 15:50:23 +00:00
"*backslash* ou le placer au début de l'ensemble. Par exemple, ``[()[\\]{}]`` "
"et ``[]()[{}]`` vont tous deux correspondre à une parenthèse, un crochet ou "
"une accolade."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:281
2018-06-28 13:32:56 +00:00
msgid ""
"Support of nested sets and set operations as in `Unicode Technical Standard "
"#18`_ might be added in the future. This would change the syntax, so to "
"facilitate this change a :exc:`FutureWarning` will be raised in ambiguous "
2018-10-13 15:54:03 +00:00
"cases for the time being. That includes sets starting with a literal ``'['`` "
2018-06-28 13:32:56 +00:00
"or containing literal character sequences ``'--'``, ``'&&'``, ``'~~'``, and "
"``'||'``. To avoid a warning escape them with a backslash."
msgstr ""
"La gestion des ensembles inclus l'un dans l'autre et les opérations "
"d'ensemble comme dans `Unicode Technical Standard #18`_ pourrait être "
"ajoutée par la suite. Ceci changerait la syntaxe, donc pour faciliter ce "
"changement, une exception :exc:`FutureWarning` sera levée dans les cas "
"ambigus pour le moment. Ceci inclut les ensembles commençant avec le "
"caractère ``'['`` ou contenant les séquences de caractères ``'--'``, "
"``'&&'``, ``'~~'`` et ``'||'``. Pour éviter un message d'avertissement, "
"échapper les séquences avec le caractère antislash (``\"\\\"``)."
2018-06-28 13:32:56 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:291
2018-06-28 13:32:56 +00:00
msgid ""
":exc:`FutureWarning` is raised if a character set contains constructs that "
"will change semantically in the future."
msgstr ""
2018-12-07 17:44:50 +00:00
"L'exception :exc:`FutureWarning` est levée si un ensemble de caractères "
"contient une construction dont la sémantique changera dans le futur."
2018-06-28 13:32:56 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:306
2017-12-01 06:48:13 +00:00
msgid "``|``"
msgstr "``|``"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:298
2016-10-30 09:46:26 +00:00
msgid ""
2017-12-01 06:48:13 +00:00
"``A|B``, where *A* and *B* can be arbitrary REs, creates a regular "
"expression that will match either *A* or *B*. An arbitrary number of REs "
"can be separated by the ``'|'`` in this way. This can be used inside groups "
"(see below) as well. As the target string is scanned, REs separated by "
"``'|'`` are tried from left to right. When one pattern completely matches, "
"that branch is accepted. This means that once *A* matches, *B* will not be "
"tested further, even if it would produce a longer overall match. In other "
"words, the ``'|'`` operator is never greedy. To match a literal ``'|'``, "
"use ``\\|``, or enclose it inside a character class, as in ``[|]``."
msgstr ""
"``A|B``, où *A* et *B* peuvent être deux expressions rationnelles "
2017-09-22 15:50:23 +00:00
"arbitraires, crée une expression rationnelle qui validera soit *A* soit "
"*B*. Un nombre arbitraire d'expressions peuvent être séparées de cette "
"façon par des ``'|'``. Cela peut aussi être utilisé au sein de groupes "
"(voir ci-dessous). Quand une chaîne cible est analysée, les expressions "
"séparées par ``'|'`` sont essayées de la gauche vers la droite. Quand un "
"motif correspond complètement, cette branche est acceptée. Cela signifie "
"qu'une fois que *A* correspond, *B* ne sera pas testée plus loin, même si "
"elle pourrait provoquer une plus ample correspondance. En d'autres termes, "
"l'opérateur ``'|'`` n'est jamais gourmand. Pour valider un ``'|'`` "
"littéral, utilisez ``\\|``, ou enveloppez-le dans une classe de caractères, "
"comme ``[|]``."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:316
2016-10-30 09:46:26 +00:00
msgid "``(...)``"
msgstr "``(...)``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:312
2016-10-30 09:46:26 +00:00
msgid ""
"Matches whatever regular expression is inside the parentheses, and indicates "
"the start and end of a group; the contents of a group can be retrieved after "
"a match has been performed, and can be matched later in the string with the "
"``\\number`` special sequence, described below. To match the literals "
"``'('`` or ``')'``, use ``\\(`` or ``\\)``, or enclose them inside a "
2017-12-01 06:48:13 +00:00
"character class: ``[(]``, ``[)]``."
msgstr ""
"Valide n'importe quelle expression rationnelle comprise entre les "
"parenthèses, et indique le début et la fin d'un groupe ; le contenu d'un "
2017-09-22 15:50:23 +00:00
"groupe peut être récupéré après qu'une analyse a été effectuée et peut être "
"réutilisé plus loin dans la chaîne avec une séquence spéciale ``\\number``, "
"décrite ci-dessous. Pour écrire des ``'('`` ou ``')'`` littéraux, utilisez "
"``\\(`` ou ``\\)``, ou enveloppez-les dans une classe de caractères : "
"``[(]``, ``[)]``."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:325
2016-10-30 09:46:26 +00:00
msgid "``(?...)``"
msgstr "``(?...)``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:321
2016-10-30 09:46:26 +00:00
msgid ""
"This is an extension notation (a ``'?'`` following a ``'('`` is not "
"meaningful otherwise). The first character after the ``'?'`` determines "
"what the meaning and further syntax of the construct is. Extensions usually "
"do not create a new group; ``(?P<name>...)`` is the only exception to this "
"rule. Following are the currently supported extensions."
msgstr ""
2017-05-27 14:30:14 +00:00
"Il s'agit d'une notation pour les extensions (un ``'?'`` suivant une ``'('`` "
2017-09-22 15:50:23 +00:00
"n'a pas de sens autrement). Le premier caractère après le ``'?'`` détermine "
2017-05-27 14:30:14 +00:00
"quel sens donner à l'expression. Les extensions ne créent généralement pas "
"de nouveaux groupes ; ``(?P<name>...)`` est la seule exception à la règle. "
"Retrouvez ci-dessous la liste des extensions actuellement supportées."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:342
2016-10-30 09:46:26 +00:00
msgid "``(?aiLmsux)``"
msgstr "``(?aiLmsux)``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:328
2016-10-30 09:46:26 +00:00
msgid ""
"(One or more letters from the set ``'a'``, ``'i'``, ``'L'``, ``'m'``, "
"``'s'``, ``'u'``, ``'x'``.) The group matches the empty string; the letters "
"set the corresponding flags: :const:`re.A` (ASCII-only matching), :const:`re."
"I` (ignore case), :const:`re.L` (locale dependent), :const:`re.M` (multi-"
2017-12-01 06:48:13 +00:00
"line), :const:`re.S` (dot matches all), :const:`re.U` (Unicode matching), "
"and :const:`re.X` (verbose), for the entire regular expression. (The flags "
"are described in :ref:`contents-of-module-re`.) This is useful if you wish "
"to include the flags as part of the regular expression, instead of passing a "
"*flag* argument to the :func:`re.compile` function. Flags should be used "
"first in the expression string."
msgstr ""
"(Une lettre ou plus de l'ensemble ``'a'``, ``'i'``, ``'L'``, ``'m'``, "
2017-09-22 15:50:23 +00:00
"``'s'``, ``'u'``, ``'x'``.) Le groupe valide la chaîne vide ; les lettres "
"activent les modes correspondants : :const:`re.A` (validation ASCII "
"seulement), :const:`re.I` (ignorer la casse), :const:`re.L` (dépendant de la "
"locale), :const:`re.M` (multi-ligne), :const:`re.S` (les points "
"correspondent à tous les caractères), :const:`re.U` (support d'Unicode) et :"
"const:`re.X` (verbeux), pour l'ensemble de l'expression rationnelle. (Les "
"options dans décrites dans la section :ref:`contents-of-module-re`.) C'est "
"utile si vous souhaitez préciser l'option dans l'expression rationnelle, "
"plutôt qu'en passant un argument *flag* à la fonction :func:`re.compile`. "
"Les options devraient être spécifiées en premier dans la chaîne de "
"l'expression."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:341
msgid "This construction can only be used at the start of the expression."
msgstr ""
"Cette construction ne peut être utilisée qu'au début d'une chaîne de "
"caractères."
2022-03-23 17:40:12 +00:00
#: library/re.rst:350
2016-10-30 09:46:26 +00:00
msgid "``(?:...)``"
msgstr "``(?:...)``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:347
2016-10-30 09:46:26 +00:00
msgid ""
"A non-capturing version of regular parentheses. Matches whatever regular "
"expression is inside the parentheses, but the substring matched by the group "
"*cannot* be retrieved after performing a match or referenced later in the "
"pattern."
msgstr ""
"Une version sans capture des parenthèses habituelles. Valide n'importe "
2017-05-27 14:30:14 +00:00
"quelle expression rationnelle à l'intérieur des parenthèses, mais la sous-"
"chaîne correspondant au groupe *ne peut pas* être récupérée après l'analyse "
"ou être référencée plus loin dans le motif."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:376
2018-06-28 13:32:56 +00:00
msgid "``(?aiLmsux-imsx:...)``"
msgstr "``(?aiLmsux-imsx:...)``"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:353
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"(Zero or more letters from the set ``'a'``, ``'i'``, ``'L'``, ``'m'``, "
"``'s'``, ``'u'``, ``'x'``, optionally followed by ``'-'`` followed by one or "
"more letters from the ``'i'``, ``'m'``, ``'s'``, ``'x'``.) The letters set "
"or remove the corresponding flags: :const:`re.A` (ASCII-only matching), :"
"const:`re.I` (ignore case), :const:`re.L` (locale dependent), :const:`re.M` "
"(multi-line), :const:`re.S` (dot matches all), :const:`re.U` (Unicode "
"matching), and :const:`re.X` (verbose), for the part of the expression. (The "
"flags are described in :ref:`contents-of-module-re`.)"
2016-10-30 09:46:26 +00:00
msgstr ""
"(Zéro lettres ou plus de l'ensemble ``'a'``, ``'i'``, ``'L'``, ``'m'``, "
"``'s'``, ``'u'``, ``'x'``, optionnellement suivies par ``'-'`` puis ``'i'``, "
"``'m'``, ``'s'``, ``'x'``.) Les lettres activent ou désactivent les options "
"correspondantes : :const:`re.A` (ASCII exclusivement), :const:`re.I` "
"(ignorer la casse), :const:`re.L` (respecte les paramètres régionaux), :"
"const:`re.M` (multi-ligne), :const:`re.S` (les points correspondent à tous "
"les caractères), :const:`re.U` (Unicode) et :const:`re.X` (verbeux), pour "
"cette partie de l'expression. (Les options sont décrites dans la section :"
"ref:`contents-of-module-re`.)"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:363
2018-06-28 13:32:56 +00:00
msgid ""
"The letters ``'a'``, ``'L'`` and ``'u'`` are mutually exclusive when used as "
"inline flags, so they can't be combined or follow ``'-'``. Instead, when "
"one of them appears in an inline group, it overrides the matching mode in "
"the enclosing group. In Unicode patterns ``(?a:...)`` switches to ASCII-"
"only matching, and ``(?u:...)`` switches to Unicode matching (default). In "
"byte pattern ``(?L:...)`` switches to locale depending matching, and ``(?"
"a:...)`` switches to ASCII-only matching (default). This override is only in "
"effect for the narrow inline group, and the original matching mode is "
"restored outside of the group."
msgstr ""
"Les caractères ``'a'``, ``'L'`` et ``'u'`` sont mutuellement exclusifs quand "
2018-12-07 17:44:50 +00:00
"ils sont utilisés comme des options dans le motif, ils ne peuvent donc ni "
2018-12-07 17:53:13 +00:00
"être combinés, ni suivre le caractère ``'-'``. Quand l'un d'entre eux "
"apparaît dans un groupe, il modifie le mode pour ce groupe. Dans les motifs "
"Unicode l'option ``(?a:...)`` bascule en mode ASCII-uniquement, et ``(?"
"u:...)`` bascule en mode Unicode (le comportement par défaut). Dans les "
2022-11-14 15:08:57 +00:00
"motifs composés d'octets, ``(?L:...)`` fait en sorte de respecter les "
"paramètres régionaux, et ``(?a:...)`` bascule en mode ASCII Uniquement (le "
"comportement par défaut). Ces modifications ne concernent que les groupes "
"dans lesquelles elles sont, le mode précédent est donc rétabli à la sortie "
"du groupe."
2018-06-28 13:32:56 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:375
2018-06-28 13:32:56 +00:00
msgid "The letters ``'a'``, ``'L'`` and ``'u'`` also can be used in a group."
msgstr ""
"Les lettres ``'a'``, ``'L'`` et ``'u'`` peuvent aussi être utilisées dans un "
"groupe."
2018-06-28 13:32:56 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:391
msgid "``(?>...)``"
msgstr "``(?>...)``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:379
msgid ""
"Attempts to match ``...`` as if it was a separate regular expression, and if "
"successful, continues to match the rest of the pattern following it. If the "
"subsequent pattern fails to match, the stack can only be unwound to a point "
"*before* the ``(?>...)`` because once exited, the expression, known as an :"
"dfn:`atomic group`, has thrown away all stack points within itself. Thus, "
"``(?>.*).`` would never match anything because first the ``.*`` would match "
"all characters possible, then, having nothing left to match, the final ``.`` "
"would fail to match. Since there are no stack points saved in the Atomic "
"Group, and there is no stack point before it, the entire expression would "
"thus fail to match."
msgstr ""
2022-05-22 21:15:02 +00:00
#: library/re.rst:421
2016-10-30 09:46:26 +00:00
msgid "``(?P<name>...)``"
msgstr "``(?P<name>...)``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:396
2016-10-30 09:46:26 +00:00
msgid ""
"Similar to regular parentheses, but the substring matched by the group is "
"accessible via the symbolic group name *name*. Group names must be valid "
"Python identifiers, and each group name must be defined only once within a "
"regular expression. A symbolic group is also a numbered group, just as if "
"the group were not named."
msgstr ""
2017-05-27 14:30:14 +00:00
"Similaires aux parenthèses habituelles, mais la sous-chaîne validée par le "
"groupe est accessible via le nom *name* du groupe symbolique. Les noms de "
"groupes doivent être des identifiants Python valides, et chaque nom de "
"groupe ne doit être défini qu'une seule fois dans une expression "
"rationnelle. Un groupe symbolique est aussi un groupe numéroté, de la même "
"manière que si le groupe n'était pas nommé."
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:402
2016-10-30 09:46:26 +00:00
msgid ""
"Named groups can be referenced in three contexts. If the pattern is ``(?"
"P<quote>['\"]).*?(?P=quote)`` (i.e. matching a string quoted with either "
"single or double quotes):"
msgstr ""
2017-09-22 15:50:23 +00:00
"Les groupes nommés peuvent être référencés dans trois contextes. Si le motif "
"est ``(?P<quote>['\"]).*?(?P=quote)`` (c.-à-d. correspondant à une chaîne "
"entourée de guillemets simples ou doubles) :"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:407
2016-10-30 09:46:26 +00:00
msgid "Context of reference to group \"quote\""
msgstr "Contexte de référence au groupe *quote*"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:407
2016-10-30 09:46:26 +00:00
msgid "Ways to reference it"
2017-05-27 14:30:14 +00:00
msgstr "Manières de le référencer"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:409
2016-10-30 09:46:26 +00:00
msgid "in the same pattern itself"
2017-05-27 14:30:14 +00:00
msgstr "lui-même dans le même motif"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:409
2016-10-30 09:46:26 +00:00
msgid "``(?P=quote)`` (as shown)"
2017-05-27 14:30:14 +00:00
msgstr "``(?P=quote)`` (comme vu)"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:417
2016-10-30 09:46:26 +00:00
msgid "``\\1``"
msgstr "``\\1``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:412
2017-12-01 06:48:13 +00:00
msgid "when processing match object *m*"
2017-12-03 13:00:24 +00:00
msgstr "en analysant l'objet résultat *m*"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:412
2016-10-30 09:46:26 +00:00
msgid "``m.group('quote')``"
msgstr "``m.group('quote')``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:413
2016-10-30 09:46:26 +00:00
msgid "``m.end('quote')`` (etc.)"
2017-05-27 14:30:14 +00:00
msgstr "``m.end('quote')`` (etc.)"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:415
2017-12-01 06:48:13 +00:00
msgid "in a string passed to the *repl* argument of ``re.sub()``"
2017-12-03 13:00:24 +00:00
msgstr "dans une chaîne passée à l'argument *repl* de ``re.sub()``"
2016-10-30 09:46:26 +00:00
2022-03-23 17:40:12 +00:00
#: library/re.rst:415
2016-10-30 09:46:26 +00:00
msgid "``\\g<quote>``"
msgstr "``\\g<quote>``"
2022-03-23 17:40:12 +00:00
#: library/re.rst:416
2016-10-30 09:46:26 +00:00
msgid "``\\g<1>``"
msgstr "``\\g<1>``"
2022-05-22 21:15:02 +00:00
#: library/re.rst:420
msgid "Group names containing non-ASCII characters in bytes patterns."
msgstr ""
"Les noms de groupe qui contiennent des caractères non-ASCII dans des motifs "
"d'octets (type *bytes*)."
2022-05-22 21:15:02 +00:00
#: library/re.rst:427
2016-10-30 09:46:26 +00:00
msgid "``(?P=name)``"
msgstr "``(?P=name)``"
2022-05-22 21:15:02 +00:00
#: library/re.rst:426
2016-10-30 09:46:26 +00:00
msgid ""
"A backreference to a named group; it matches whatever text was matched by "
"the earlier group named *name*."
msgstr ""
2017-05-27 14:30:14 +00:00
"Une référence arrière à un groupe nommé ; elle correspond à n'importe quel "
"texte validé plus tôt par le groupe nommé *name*."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/re.rst:432
2016-10-30 09:46:26 +00:00
msgid "``(?#...)``"
msgstr "``(?#...)``"
2022-05-22 21:15:02 +00:00
#: library/re.rst:432
2016-10-30 09:46:26 +00:00
msgid "A comment; the contents of the parentheses are simply ignored."
2017-05-27 14:30:14 +00:00
msgstr "Un commentaire ; le contenu des parenthèses est simplement ignoré."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/re.rst:439
2016-10-30 09:46:26 +00:00
msgid "``(?=...)``"
msgstr "``(?=...)``"
2022-05-22 21:15:02 +00:00
#: library/re.rst:437
2016-10-30 09:46:26 +00:00
msgid ""
"Matches if ``...`` matches next, but doesn't consume any of the string. "
2017-12-01 06:48:13 +00:00
"This is called a :dfn:`lookahead assertion`. For example, ``Isaac (?"
"=Asimov)`` will match ``'Isaac '`` only if it's followed by ``'Asimov'``."
msgstr ""
"Valide si ``...`` valide la suite, mais ne consomme rien de la chaîne. On "
"appelle cela une assertion :dfn:`lookahead`. Par exemple, ``Isaac (?"
"=Asimov)`` correspondra à la chaîne ``'Isaac '`` seulement si elle est "
"suivie par ``'Asimov'``."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/re.rst:446
2016-10-30 09:46:26 +00:00
msgid "``(?!...)``"
msgstr "``(?!...)``"
2022-05-22 21:15:02 +00:00
#: library/re.rst:444
2016-10-30 09:46:26 +00:00
msgid ""
2017-12-01 06:48:13 +00:00
"Matches if ``...`` doesn't match next. This is a :dfn:`negative lookahead "
"assertion`. For example, ``Isaac (?!Asimov)`` will match ``'Isaac '`` only "
"if it's *not* followed by ``'Asimov'``."
msgstr ""
"Valide si ``...`` ne valide pas la suite. C'est une assertion :dfn:"
"`negative lookahead`. Par exemple, ``Isaac (?!Asimov)`` correspondra à la "
"chaîne ``'Isaac '`` seulement si elle *n'est pas* suivie par ``'Asimov'``."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/re.rst:473
2016-10-30 09:46:26 +00:00
msgid "``(?<=...)``"
msgstr "``(?<=...)``"
2022-05-22 21:15:02 +00:00
#: library/re.rst:451
2016-10-30 09:46:26 +00:00
msgid ""
"Matches if the current position in the string is preceded by a match for "
"``...`` that ends at the current position. This is called a :dfn:`positive "
2017-12-01 06:48:13 +00:00
"lookbehind assertion`. ``(?<=abc)def`` will find a match in ``'abcdef'``, "
2016-10-30 09:46:26 +00:00
"since the lookbehind will back up 3 characters and check if the contained "
"pattern matches. The contained pattern must only match strings of some fixed "
"length, meaning that ``abc`` or ``a|b`` are allowed, but ``a*`` and ``a{3,4}"
"`` are not. Note that patterns which start with positive lookbehind "
"assertions will not match at the beginning of the string being searched; you "
"will most likely want to use the :func:`search` function rather than the :"
"func:`match` function:"
msgstr ""
"Valide si la position courante dans la chaîne est précédée par une "
"correspondance sur ``...`` qui se termine à la position courante. On "
"appelle cela une :dfn:`positive lookbehind assertion`. ``(?<=abc)def`` "
"cherchera une correspondance dans ``'abcdef'``, puisque le *lookbehind** "
"mettra de côté 3 caractères et vérifiera que le motif contenu correspond. "
"Le motif ne devra correspondre qu'à des chaînes de taille fixe, cela veut "
2022-11-14 15:08:57 +00:00
"dire que ``abc`` ou ``a|b`` sont autorisées, mais pas ``a*`` ou ``a{3,4}``. "
"Notez que les motifs qui commencent par des assertions *lookbehind* "
"positives ne peuvent pas correspondre au début de la chaîne analysée ; vous "
"préférerez sûrement utiliser la fonction :func:`search` plutôt que la "
"fonction :func:`match` :"
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/re.rst:466
2016-10-30 09:46:26 +00:00
msgid "This example looks for a word following a hyphen:"
2017-05-27 14:30:14 +00:00
msgstr "Cet exemple recherche un mot suivi d'un trait d'union :"
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/re.rst:472
2016-10-30 09:46:26 +00:00
msgid "Added support for group references of fixed length."
2017-05-27 14:30:14 +00:00
msgstr "Ajout du support des références aux groupes de taille fixe."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/re.rst:482
2016-10-30 09:46:26 +00:00
msgid "``(?<!...)``"
msgstr "``(?<!...)``"
2022-05-22 21:15:02 +00:00
#: library/re.rst:478
2016-10-30 09:46:26 +00:00
msgid ""
"Matches if the current position in the string is not preceded by a match for "
"``...``. This is called a :dfn:`negative lookbehind assertion`. Similar to "
"positive lookbehind assertions, the contained pattern must only match "
"strings of some fixed length. Patterns which start with negative lookbehind "
"assertions may match at the beginning of the string being searched."
msgstr ""
2017-05-27 14:30:14 +00:00
"Valide si la position courante dans la chaîne n'est pas précédée par une "
"correspondance sur ``...``. On appelle cela une :dfn:`negative lookbehind "
"assertion`. À la manière des assertions *lookbehind* positives, le motif "
"contenu ne peut que correspondre à des chaînes de taille fixe. Les motifs "
"débutant par une assertion *lookbehind* négative peuvent correspondre au "
"début de la chaîne analysée."
2016-10-30 09:46:26 +00:00
#: library/re.rst:497
2016-10-30 09:46:26 +00:00
msgid "``(?(id/name)yes-pattern|no-pattern)``"
2017-05-27 14:30:14 +00:00
msgstr "``(?(id/name)yes-pattern|no-pattern)``"
2016-10-30 09:46:26 +00:00
#: library/re.rst:488
2016-10-30 09:46:26 +00:00
msgid ""
"Will try to match with ``yes-pattern`` if the group with given *id* or "
"*name* exists, and with ``no-pattern`` if it doesn't. ``no-pattern`` is "
"optional and can be omitted. For example, ``(<)?(\\w+@\\w+(?:\\.\\w+)+)(?"
"(1)>|$)`` is a poor email matching pattern, which will match with "
"``'<user@host.com>'`` as well as ``'user@host.com'``, but not with "
"``'<user@host.com'`` nor ``'user@host.com>'``."
msgstr ""
2017-05-27 14:30:14 +00:00
"Essaiera de faire la correspondance avec ``yes-pattern`` si le groupe "
"indiqué par *id* ou *name* existe, et avec ``no-pattern`` s'il n'existe pas. "
"``no-pattern`` est optionnel et peut être omis. Par exemple, ``(<)?"
"(\\w+@\\w+(?:\\.\\w+)+)(?(1)>|$)`` est un motif simpliste pour identifier "
"une adresse courriel, qui validera ``'<user@host.com>'`` ainsi que "
"``'user@host.com'`` mais pas ``'<user@host.com'`` ni ``'user@host.com>'``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:495
2022-05-22 21:15:02 +00:00
msgid "Group *id* containing anything except ASCII digits."
msgstr ""
"Identifiant ``id`` de groupe contenant autre chose que des chiffres ASCII."
2022-05-22 21:15:02 +00:00
#: library/re.rst:499
2016-10-30 09:46:26 +00:00
msgid ""
"The special sequences consist of ``'\\'`` and a character from the list "
"below. If the ordinary character is not an ASCII digit or an ASCII letter, "
"then the resulting RE will match the second character. For example, ``\\$`` "
"matches the character ``'$'``."
msgstr ""
2017-05-27 14:30:14 +00:00
"Les séquences spéciales sont composées de ``'\\'`` et d'un caractère de la "
"liste qui suit. Si le caractère ordinaire n'est pas un chiffre *ASCII* ou "
"une lettre *ASCII*, alors l'expression rationnelle résultante validera le "
"second caractère de la séquence. Par exemple, ``\\$`` correspond au "
"caractère ``'$'``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:514
2016-10-30 09:46:26 +00:00
msgid "``\\number``"
msgstr "``\\number``"
#: library/re.rst:507
2016-10-30 09:46:26 +00:00
msgid ""
"Matches the contents of the group of the same number. Groups are numbered "
"starting from 1. For example, ``(.+) \\1`` matches ``'the the'`` or ``'55 "
"55'``, but not ``'thethe'`` (note the space after the group). This special "
"sequence can only be used to match one of the first 99 groups. If the first "
"digit of *number* is 0, or *number* is 3 octal digits long, it will not be "
"interpreted as a group match, but as the character with octal value "
"*number*. Inside the ``'['`` and ``']'`` of a character class, all numeric "
"escapes are treated as characters."
msgstr ""
2017-05-29 16:39:49 +00:00
"Correspond au contenu du groupe du même nombre. Les groupes sont numérotés à "
"partir de 1. Par exemple, ``(.+) \\1`` correspond à ``'the the'`` ou ``'55 "
"55'``, mais pas à ``'thethe'`` (notez l'espace après le groupe). Cette "
"séquence spéciale ne peut être utilisée que pour faire référence aux 99 "
"premiers groupes. Si le premier chiffre de *number* est 0, ou si *number* "
"est un nombre octal de 3 chiffres, il ne sera pas interprété comme une "
"référence à un groupe, mais comme le caractère à la valeur octale *number*. "
"À l'intérieur des ``'['`` et ``']'`` d'une classe de caractères, tous les "
"échappements numériques sont traités comme des caractères."
2016-10-30 09:46:26 +00:00
#: library/re.rst:519
2016-10-30 09:46:26 +00:00
msgid "``\\A``"
msgstr "``\\A``"
#: library/re.rst:519
2016-10-30 09:46:26 +00:00
msgid "Matches only at the start of the string."
2017-05-29 16:39:49 +00:00
msgstr "Correspond uniquement au début d'une chaîne de caractères."
2016-10-30 09:46:26 +00:00
#: library/re.rst:535
2016-10-30 09:46:26 +00:00
msgid "``\\b``"
msgstr "``\\b``"
#: library/re.rst:524
2016-10-30 09:46:26 +00:00
msgid ""
"Matches the empty string, but only at the beginning or end of a word. A word "
2017-12-01 06:48:13 +00:00
"is defined as a sequence of word characters. Note that formally, ``\\b`` is "
"defined as the boundary between a ``\\w`` and a ``\\W`` character (or vice "
"versa), or between ``\\w`` and the beginning/end of the string. This means "
"that ``r'\\bfoo\\b'`` matches ``'foo'``, ``'foo.'``, ``'(foo)'``, ``'bar foo "
2016-10-30 09:46:26 +00:00
"baz'`` but not ``'foobar'`` or ``'foo3'``."
msgstr ""
"Correspond à la chaîne vide, mais uniquement au début ou à la fin d'un mot. "
2020-09-28 21:27:18 +00:00
"Un mot est défini comme une séquence de « caractères de mots ». Notez que "
"formellement, ``\\b`` est défini comme la liaison entre ``\\w`` et ``\\W`` "
"(et inversement), ou entre ``\\w`` et le début/fin d'un mot. Cela signifie "
"que ``r'\\bfoo\\b'`` validera ``'foo'``, ``'foo.'``, ``'(foo)'`` ou ``'bar "
"foo baz'`` mais pas ``'foobar'`` ou ``'foo3'``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:531
2016-10-30 09:46:26 +00:00
msgid ""
2017-12-01 06:48:13 +00:00
"By default Unicode alphanumerics are the ones used in Unicode patterns, but "
"this can be changed by using the :const:`ASCII` flag. Word boundaries are "
"determined by the current locale if the :const:`LOCALE` flag is used. Inside "
"a character range, ``\\b`` represents the backspace character, for "
"compatibility with Python's string literals."
msgstr ""
"Les caractères alphanumériques Unicode sont utilisés par défaut dans les "
"motifs Unicode, mais cela peut être changé en utilisant l'option :const:"
"`ASCII`. Les délimitations de mots sont déterminées par la locale si "
"l'option :const:`LOCALE` est utilisée. À l'intérieur d'un intervalle de "
2020-09-28 21:27:18 +00:00
"caractères, ``\\b`` représente le caractère *retour arrière*, par "
"compatibilité avec les chaînes littérales Python."
2016-10-30 09:46:26 +00:00
#: library/re.rst:546
2016-10-30 09:46:26 +00:00
msgid "``\\B``"
msgstr "``\\B``"
#: library/re.rst:540
2016-10-30 09:46:26 +00:00
msgid ""
"Matches the empty string, but only when it is *not* at the beginning or end "
"of a word. This means that ``r'py\\B'`` matches ``'python'``, ``'py3'``, "
"``'py2'``, but not ``'py'``, ``'py.'``, or ``'py!'``. ``\\B`` is just the "
2017-12-01 06:48:13 +00:00
"opposite of ``\\b``, so word characters in Unicode patterns are Unicode "
"alphanumerics or the underscore, although this can be changed by using the :"
"const:`ASCII` flag. Word boundaries are determined by the current locale if "
"the :const:`LOCALE` flag is used."
msgstr ""
"Correspond à la chaîne vide, mais uniquement quand elle *n'est pas* au début "
"ou à la fin d'un mot. Cela signifie que ``r'py\\B'`` valide ``'python'``, "
"``'py3'`` ou ``'py2'``, mais pas ``'py'``, ``'py.'`` ou ``'py!'``. ``\\B`` "
"est simplement l'opposé de ``\\b``, donc les caractères de mots dans les "
"motifs Unicode sont les alphanumériques et tirets bas Unicode, bien que cela "
"puisse être changé avec l'option :const:`ASCII`. Les délimitations de mots "
"sont déterminées par la locale si l'option :const:`LOCALE` est utilisée."
2016-10-30 09:46:26 +00:00
#: library/re.rst:558
2016-10-30 09:46:26 +00:00
msgid "``\\d``"
msgstr "``\\d``"
#: library/re.rst:575 library/re.rst:594
2016-10-30 09:46:26 +00:00
msgid "For Unicode (str) patterns:"
2020-09-28 21:27:18 +00:00
msgstr "Pour les motifs Unicode (*str*) :"
2016-10-30 09:46:26 +00:00
#: library/re.rst:552
2016-10-30 09:46:26 +00:00
msgid ""
"Matches any Unicode decimal digit (that is, any character in Unicode "
"character category [Nd]). This includes ``[0-9]``, and also many other "
"digit characters. If the :const:`ASCII` flag is used only ``[0-9]`` is "
2018-06-28 13:32:56 +00:00
"matched."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-29 16:39:49 +00:00
"Valide n'importe quel chiffre décimal Unicode (soit tout caractère Unicode "
2018-11-13 22:32:17 +00:00
"de catégorie [Nd]). Cela inclut ``[0-9]``, mais aussi bien d'autres "
2017-05-29 16:39:49 +00:00
"caractères de chiffres. Si l'option :const:`ASCII` est utilisée, seuls les "
"caractères de la classe ``[0-9]`` correspondront."
2016-10-30 09:46:26 +00:00
#: library/re.rst:579 library/re.rst:600
2016-10-30 09:46:26 +00:00
msgid "For 8-bit (bytes) patterns:"
msgstr "Pour les motifs 8-bits (*bytes*) :"
2016-10-30 09:46:26 +00:00
#: library/re.rst:558
2016-10-30 09:46:26 +00:00
msgid "Matches any decimal digit; this is equivalent to ``[0-9]``."
2017-05-29 16:39:49 +00:00
msgstr "Valide n'importe quel chiffre décimal ; équivalent à ``[0-9]``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:565
2016-10-30 09:46:26 +00:00
msgid "``\\D``"
msgstr "``\\D``"
#: library/re.rst:563
2016-10-30 09:46:26 +00:00
msgid ""
2017-12-01 06:48:13 +00:00
"Matches any character which is not a decimal digit. This is the opposite of "
"``\\d``. If the :const:`ASCII` flag is used this becomes the equivalent of "
2018-06-28 13:32:56 +00:00
"``[^0-9]``."
msgstr ""
"Valide tout caractère qui n'est pas un chiffre décimal. C'est l'opposé de "
"``\\d``. Si l'option :const:`ASCII` est utilisée, cela devient équivalent à "
"``[^0-9]``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:579
2016-10-30 09:46:26 +00:00
msgid "``\\s``"
msgstr "``\\s``"
#: library/re.rst:571
2016-10-30 09:46:26 +00:00
msgid ""
"Matches Unicode whitespace characters (which includes "
"``[ \\t\\n\\r\\f\\v]``, and also many other characters, for example the non-"
"breaking spaces mandated by typography rules in many languages). If the :"
"const:`ASCII` flag is used, only ``[ \\t\\n\\r\\f\\v]`` is matched."
2016-10-30 09:46:26 +00:00
msgstr ""
"Valide les caractères d'espacement Unicode (qui incluent "
"``[ \\t\\n\\r\\f\\v]`` et bien d'autres, comme les espaces insécables "
"requises par les règles typographiques de beaucoup de langues). Si l'option :"
"const:`ASCII` est utilisée, seuls les caractères de la classe "
"``[ \\t\\n\\r\\f\\v]`` sont validés."
2016-10-30 09:46:26 +00:00
#: library/re.rst:578
2016-10-30 09:46:26 +00:00
msgid ""
"Matches characters considered whitespace in the ASCII character set; this is "
"equivalent to ``[ \\t\\n\\r\\f\\v]``."
msgstr ""
2017-05-29 16:39:49 +00:00
"Valide les caractères considérés comme des espacements dans la table ASCII ; "
"équivalent à ``[ \\t\\n\\r\\f\\v]``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:586
2016-10-30 09:46:26 +00:00
msgid "``\\S``"
msgstr "``\\S``"
#: library/re.rst:584
2016-10-30 09:46:26 +00:00
msgid ""
2017-12-01 06:48:13 +00:00
"Matches any character which is not a whitespace character. This is the "
"opposite of ``\\s``. If the :const:`ASCII` flag is used this becomes the "
2018-06-28 13:32:56 +00:00
"equivalent of ``[^ \\t\\n\\r\\f\\v]``."
msgstr ""
"Valide tout caractère qui n'est pas un caractère d'espacement. C'est "
"l'opposé de ``\\s``. Si l'option :const:`ASCII` est utilisée, cela devient "
"équivalent à ``[^ \\t\\n\\r\\f\\v]``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:600
2016-10-30 09:46:26 +00:00
msgid "``\\w``"
msgstr "``\\w``"
#: library/re.rst:592
2016-10-30 09:46:26 +00:00
msgid ""
"Matches Unicode word characters; this includes alphanumeric characters (as "
"defined by :meth:`str.isalnum`) as well as the underscore (``_``). If the :"
"const:`ASCII` flag is used, only ``[a-zA-Z0-9_]`` is matched."
2016-10-30 09:46:26 +00:00
msgstr ""
"Valide les caractères Unicode de mot ; cela inclut les caractères "
"alphanumériques (tels que définis par :meth:`str.isalnum`), ainsi que les "
"tirets bas(``_``). Si l'option :const:`ASCII` est utilisée, seuls les "
"caractères de la classe ``[a-zA-Z0-9_]`` sont validés."
2016-10-30 09:46:26 +00:00
#: library/re.rst:597
2016-10-30 09:46:26 +00:00
msgid ""
"Matches characters considered alphanumeric in the ASCII character set; this "
2017-12-01 06:48:13 +00:00
"is equivalent to ``[a-zA-Z0-9_]``. If the :const:`LOCALE` flag is used, "
"matches characters considered alphanumeric in the current locale and the "
"underscore."
msgstr ""
"Valide les caractères alphanumériques de la table ASCII ; équivalent à ``[a-"
"zA-Z0-9_]``. Si l'option :const:`LOCALE` est utilisée, les caractères "
"considérés alphanumériques dans la locale et le tiret bas seront acceptés."
2016-10-30 09:46:26 +00:00
#: library/re.rst:609
2016-10-30 09:46:26 +00:00
msgid "``\\W``"
msgstr "``\\W``"
#: library/re.rst:605
2016-10-30 09:46:26 +00:00
msgid ""
2017-12-01 06:48:13 +00:00
"Matches any character which is not a word character. This is the opposite of "
"``\\w``. If the :const:`ASCII` flag is used this becomes the equivalent of "
2018-06-28 13:32:56 +00:00
"``[^a-zA-Z0-9_]``. If the :const:`LOCALE` flag is used, matches characters "
2019-10-09 16:10:12 +00:00
"which are neither alphanumeric in the current locale nor the underscore."
msgstr ""
"Valide tout caractère qui n'est pas un caractère de mot. C'est l'opposé de "
"``\\w``. Si l'option :const:`ASCII` est utilisée, cela devient équivalent à "
"``[^a-zA-Z0-9_]``. Si l'option :const:`LOCALE` est utilisée, les caractères "
"considérés alphanumériques dans la locale, et le tiret bas, ne correspondent "
"pas."
2016-10-30 09:46:26 +00:00
#: library/re.rst:614
2016-10-30 09:46:26 +00:00
msgid "``\\Z``"
msgstr "``\\Z``"
#: library/re.rst:614
2016-10-30 09:46:26 +00:00
msgid "Matches only at the end of the string."
2017-05-29 16:39:49 +00:00
msgstr "Correspond uniquement à la fin d'une chaîne de caractères."
2016-10-30 09:46:26 +00:00
#: library/re.rst:630
2016-10-30 09:46:26 +00:00
msgid ""
"Most of the standard escapes supported by Python string literals are also "
"accepted by the regular expression parser::"
msgstr ""
2017-05-29 16:39:49 +00:00
"La plupart des échappements standards supportés par les chaînes littérales "
"sont aussi acceptés par l'analyseur d'expressions rationnelles ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:637
2016-10-30 09:46:26 +00:00
msgid ""
"(Note that ``\\b`` is used to represent word boundaries, and means "
"\"backspace\" only inside character classes.)"
msgstr ""
2017-05-29 16:39:49 +00:00
"(Notez que ``\\b`` est utilisé pour représenter les bornes d'un mot, et "
2020-09-28 21:27:18 +00:00
"signifie « *retour arrière* » uniquement à l'intérieur d'une classe de "
"caractères)"
2016-10-30 09:46:26 +00:00
#: library/re.rst:640
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-04 09:35:23 +00:00
"``'\\u'``, ``'\\U'``, and ``'\\N'`` escape sequences are only recognized in "
"Unicode patterns. In bytes patterns they are errors. Unknown escapes of "
"ASCII letters are reserved for future use and treated as errors."
msgstr ""
"Les séquences d'échappement ``'\\u'``, ``'\\U'`` et ``'\\N'`` sont seulement "
"reconnues dans les motifs Unicode. Dans les motifs d'octets (type *bytes*), "
"ce sont des erreurs. Les échappements inconnus de lettres ASCII sont "
"réservés pour une utilisation future et sont considérés comme des erreurs."
2016-10-30 09:46:26 +00:00
#: library/re.rst:644
2016-10-30 09:46:26 +00:00
msgid ""
"Octal escapes are included in a limited form. If the first digit is a 0, or "
"if there are three octal digits, it is considered an octal escape. "
"Otherwise, it is a group reference. As for string literals, octal escapes "
"are always at most three digits in length."
msgstr ""
"Les séquences octales d'échappement sont incluses dans une forme limitée. "
"Si le premier chiffre est un 0, ou s'il y a trois chiffres octaux, la "
"séquence est considérée comme octale. Autrement, il s'agit d'une référence "
"vers un groupe. Comme pour les chaînes littérales, les séquences octales ne "
"font jamais plus de 3 caractères de long."
2016-10-30 09:46:26 +00:00
#: library/re.rst:649
2016-10-30 09:46:26 +00:00
msgid "The ``'\\u'`` and ``'\\U'`` escape sequences have been added."
2017-05-29 16:39:49 +00:00
msgstr "Les séquences d'échappement ``'\\u'`` et ``'\\U'`` ont été ajoutées."
2016-10-30 09:46:26 +00:00
#: library/re.rst:652
2016-10-30 09:46:26 +00:00
msgid ""
"Unknown escapes consisting of ``'\\'`` and an ASCII letter now are errors."
msgstr ""
2017-05-29 16:39:49 +00:00
"Les séquences inconnues composées de ``'\\'`` et d'une lettre ASCII sont "
"maintenant des erreurs."
2016-10-30 09:46:26 +00:00
#: library/re.rst:655
2019-09-04 09:35:23 +00:00
msgid ""
"The ``'\\N{name}'`` escape sequence has been added. As in string literals, "
"it expands to the named Unicode character (e.g. ``'\\N{EM DASH}'``)."
msgstr ""
"La séquence d'échappement ``'\\N{name}'`` a été ajoutée. Comme avec des "
"chaînes de caractères littérales, elle est transformée vers le caractère "
"Unicode correspondant (par exemple ``'\\N{EM DASH}'``)."
2019-09-04 09:35:23 +00:00
#: library/re.rst:663
2016-10-30 09:46:26 +00:00
msgid "Module Contents"
2017-05-29 16:39:49 +00:00
msgstr "Contenu du module"
2016-10-30 09:46:26 +00:00
#: library/re.rst:665
2016-10-30 09:46:26 +00:00
msgid ""
"The module defines several functions, constants, and an exception. Some of "
"the functions are simplified versions of the full featured methods for "
"compiled regular expressions. Most non-trivial applications always use the "
"compiled form."
msgstr ""
2017-05-29 16:39:49 +00:00
"Le module définit plusieurs fonctions, constantes, et une exception. "
"Certaines fonctions sont des versions simplifiées des méthodes plus "
"complètes des expressions rationnelles compilées. La plupart des "
"applications non triviales utilisent toujours la version compilée."
2016-10-30 09:46:26 +00:00
#: library/re.rst:672
msgid "Flags"
msgstr ""
#: library/re.rst:674
2017-04-02 20:14:06 +00:00
msgid ""
"Flag constants are now instances of :class:`RegexFlag`, which is a subclass "
"of :class:`enum.IntFlag`."
msgstr ""
2017-05-29 16:39:49 +00:00
"Les constantes d'options sont maintenant des instances de :class:"
"`RegexFlag`, sous-classe de :class:`enum.IntFlag`."
2017-04-02 20:14:06 +00:00
#: library/re.rst:681
2022-03-23 17:40:12 +00:00
msgid ""
"An :class:`enum.IntFlag` class containing the regex options listed below."
msgstr ""
#: library/re.rst:683
2022-03-23 17:40:12 +00:00
msgid "- added to ``__all__``"
msgstr ""
#: library/re.rst:688
2016-10-30 09:46:26 +00:00
msgid ""
"Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\d``, ``\\D``, ``\\s`` and "
"``\\S`` perform ASCII-only matching instead of full Unicode matching. This "
"is only meaningful for Unicode patterns, and is ignored for byte patterns. "
2017-12-01 06:48:13 +00:00
"Corresponds to the inline flag ``(?a)``."
msgstr ""
"Fait correspondre à ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\d``, ``\\D``, "
"``\\s`` et ``\\s`` des caractères ASCII seulement, plutôt qu'Unicode. Cela "
"n'a du sens que pour les motifs Unicode, et est ignoré pour les motifs 8-"
"bits. Correspond à l'option de groupe ``(?a)``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:693
2016-10-30 09:46:26 +00:00
msgid ""
"Note that for backward compatibility, the :const:`re.U` flag still exists "
"(as well as its synonym :const:`re.UNICODE` and its embedded counterpart ``(?"
"u)``), but these are redundant in Python 3 since matches are Unicode by "
"default for strings (and Unicode matching isn't allowed for bytes)."
msgstr ""
2017-05-30 16:29:00 +00:00
"Notez que par compatibilité envers les versions précédentes, l'option :const:"
"`re.U` existe toujours (ainsi que son synonyme :const:`re.UNICODE` et sa "
"version embarquée ``(?u)``), mais elles sont redondantes en Python 3 depuis "
"que l'analyse est faite en Unicode par défaut pour les chaînes de caractères "
"(et que l'analyse Unicode n'est pas permise pour les chaînes 8-bit)."
2016-10-30 09:46:26 +00:00
#: library/re.rst:702
2017-12-01 06:48:13 +00:00
msgid ""
"Display debug information about compiled expression. No corresponding inline "
"flag."
msgstr ""
"Affiche des informations de débogage à propos de l'expression compilée. N'a "
2018-12-07 17:44:50 +00:00
"pas d'option de groupe équivalente."
2016-10-30 09:46:26 +00:00
#: library/re.rst:709
2016-10-30 09:46:26 +00:00
msgid ""
2017-09-12 11:40:22 +00:00
"Perform case-insensitive matching; expressions like ``[A-Z]`` will also "
2017-12-01 06:48:13 +00:00
"match lowercase letters. Full Unicode matching (such as ``Ü`` matching "
"``ü``) also works unless the :const:`re.ASCII` flag is used to disable non-"
"ASCII matches. The current locale does not change the effect of this flag "
"unless the :const:`re.LOCALE` flag is also used. Corresponds to the inline "
"flag ``(?i)``."
msgstr ""
"Effectue une analyse indépendante de la casse. Les motifs tels que ``[A-Z]`` "
"accepteront donc les caractères minuscules. L'analyse Unicode complète (tel "
"que ``Ü`` correspondant à ``ü``) fonctionne aussi, tant que l'option :const:"
"`re.ASCII` n'est pas utilisée. La locale n'affecte pas cette option, tant "
"que l'option :const:`re.LOCALE` n'est pas utilisée. Correspond au marqueur "
2018-12-07 17:44:50 +00:00
"de groupe ``(?i)``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:716
2017-12-01 06:48:13 +00:00
msgid ""
"Note that when the Unicode patterns ``[a-z]`` or ``[A-Z]`` are used in "
"combination with the :const:`IGNORECASE` flag, they will match the 52 ASCII "
"letters and 4 additional non-ASCII letters: 'İ' (U+0130, Latin capital "
"letter I with dot above), 'ı' (U+0131, Latin small letter dotless i), "
"'ſ' (U+017F, Latin small letter long s) and '' (U+212A, Kelvin sign). If "
"the :const:`ASCII` flag is used, only letters 'a' to 'z' and 'A' to 'Z' are "
2018-06-28 13:32:56 +00:00
"matched."
2017-12-01 06:48:13 +00:00
msgstr ""
2018-12-07 17:47:18 +00:00
"À noter : quand les motifs Unicode ``[a-z]`` ou ``[A-Z]`` sont utilisés en "
2018-12-07 17:44:50 +00:00
"combinaison avec la constante :const:`IGNORECASE`, ils correspondront aux 52 "
"caractères ASCII et aux 4 caractères non ASCII : 'İ' (*U+0130*, Latin "
2018-12-07 17:44:50 +00:00
"majuscule I avec un point au-dessus), 'ı' (*U+0131*, Latin minuscule sans "
"point au-dessus), 'ſ' (*U+017F*, Latin minuscule *long s*) et '' (*U+212A*, "
2018-12-07 17:53:13 +00:00
"*Kelvin sign*). Si la constante :const:`ASCII` est utilisée, seuls les "
"caractères 'a' à 'z' et 'A' à 'Z' seront concernés."
2017-12-01 06:48:13 +00:00
#: library/re.rst:727
2016-10-30 09:46:26 +00:00
msgid ""
2017-12-01 06:48:13 +00:00
"Make ``\\w``, ``\\W``, ``\\b``, ``\\B`` and case-insensitive matching "
"dependent on the current locale. This flag can be used only with bytes "
"patterns. The use of this flag is discouraged as the locale mechanism is "
"very unreliable, it only handles one \"culture\" at a time, and it only "
"works with 8-bit locales. Unicode matching is already enabled by default in "
"Python 3 for Unicode (str) patterns, and it is able to handle different "
"locales/languages. Corresponds to the inline flag ``(?L)``."
msgstr ""
"Fait dépendre de la locale courante : ``\\w``, ``\\W``, ``\\b``, ``\\B``, et "
"l'analyse insensible à la casse. Cette option peut être utilisée avec les "
"motifs en *bytes*. L'utilisation de cette option est déconseillée à cause du "
"mécanisme de locale très peu fiable, et ne gérant qu'une « culture » à la "
"fois, et ne fonctionnant que pour les locales 8-bits. L'analyse Unicode est "
"déjà activée par défaut dans Python 3 pour les motifs Unicode (*str*), et "
"elle est capable de gérer plusieurs locales et langages. Correspond à "
2018-12-07 17:44:50 +00:00
"l'option de groupe ``(?L)``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:736
2016-10-30 09:46:26 +00:00
msgid ""
":const:`re.LOCALE` can be used only with bytes patterns and is not "
"compatible with :const:`re.ASCII`."
msgstr ""
":const:`re.LOCALE` ne peut être utilisée qu'avec les motifs 8-bits et n'est "
2017-05-30 16:29:00 +00:00
"pas compatible avec :const:`re.ASCII`."
2016-10-30 09:46:26 +00:00
#: library/re.rst:740
2018-06-28 13:32:56 +00:00
msgid ""
"Compiled regular expression objects with the :const:`re.LOCALE` flag no "
"longer depend on the locale at compile time. Only the locale at matching "
"time affects the result of matching."
msgstr ""
2019-03-21 20:05:38 +00:00
"Les objets d'expressions régulières compilées avec l'indicateur :const:`re."
"LOCALE` ne dépendent plus de la *locale* au moment de la compilation. "
"Seulement la *locale* au moment de la correspondance affecte le résultat."
2018-06-28 13:32:56 +00:00
#: library/re.rst:749
2016-10-30 09:46:26 +00:00
msgid ""
"When specified, the pattern character ``'^'`` matches at the beginning of "
"the string and at the beginning of each line (immediately following each "
"newline); and the pattern character ``'$'`` matches at the end of the string "
"and at the end of each line (immediately preceding each newline). By "
"default, ``'^'`` matches only at the beginning of the string, and ``'$'`` "
"only at the end of the string and immediately before the newline (if any) at "
2017-12-01 06:48:13 +00:00
"the end of the string. Corresponds to the inline flag ``(?m)``."
msgstr ""
"Quand spécifiée, le caractère ``'^'`` correspond au début d'une chaîne et au "
"début d'une ligne (caractère suivant directement le saut de ligne) ; et le "
"caractère ``'$'`` correspond à la fin d'une chaîne et à la fin d'une ligne "
"(juste avant le saut de ligne). Par défaut, ``'^'`` correspond uniquement "
"au début de la chaîne, et ``'$'`` uniquement à la fin de la chaîne, ou "
"immédiatement avant le saut de ligne (s'il y a) à la fin de la chaîne. "
2018-12-07 17:44:50 +00:00
"Correspond à l'option de groupe ``(?m)``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:759
2022-03-23 17:40:12 +00:00
msgid ""
"Indicates no flag being applied, the value is ``0``. This flag may be used "
"as a default value for a function keyword argument or as a base value that "
"will be conditionally ORed with other flags. Example of use as a default "
"value::"
msgstr ""
#: library/re.rst:772
2016-10-30 09:46:26 +00:00
msgid ""
"Make the ``'.'`` special character match any character at all, including a "
2017-12-01 06:48:13 +00:00
"newline; without this flag, ``'.'`` will match anything *except* a newline. "
"Corresponds to the inline flag ``(?s)``."
msgstr ""
"Fait correspondre tous les caractères possibles à ``'.'``, incluant le saut "
"de ligne ; sans cette option, ``'.'`` correspondrait à tout caractère à "
2018-12-07 17:44:50 +00:00
"l'exception du saut de ligne. Correspond à l'option de groupe ``(?s)``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:782
2016-10-30 09:46:26 +00:00
msgid ""
"This flag allows you to write regular expressions that look nicer and are "
"more readable by allowing you to visually separate logical sections of the "
"pattern and add comments. Whitespace within the pattern is ignored, except "
2017-12-01 06:48:13 +00:00
"when in a character class, or when preceded by an unescaped backslash, or "
"within tokens like ``*?``, ``(?:`` or ``(?P<...>``. For example, ``(? :`` "
"and ``* ?`` are not allowed. When a line contains a ``#`` that is not in a "
"character class and is not preceded by an unescaped backslash, all "
"characters from the leftmost such ``#`` through the end of the line are "
"ignored."
msgstr ""
"Cette option vous autorise à écrire des expressions rationnelles qui "
"présentent mieux et sont plus lisibles en vous permettant de séparer "
"visuellement les sections logiques du motif et d'ajouter des commentaires. "
"Les caractères d'espacement à l'intérieur du motif sont ignorés, sauf à "
"l'intérieur des classes de caractères ou quand ils sont précédés d'un "
"*backslash* non échappé, ou dans des séquences comme ``*?``, ``(?:`` ou ``(?"
"P<...>``.Par exemple, ``(? :`` et ``* ?`` ne sont pas autorisés. Quand une "
"ligne contient un ``#`` qui n'est ni dans une classe de caractères, ni "
"précédé d'un *backslash* non échappé, tous les caractères depuis le ``#`` le "
"plus à gauche jusqu'à la fin de la ligne sont ignorés."
2016-10-30 09:46:26 +00:00
#: library/re.rst:792
2016-10-30 09:46:26 +00:00
msgid ""
"This means that the two following regular expression objects that match a "
"decimal number are functionally equal::"
msgstr ""
2017-05-30 16:29:00 +00:00
"Cela signifie que les deux expressions rationnelles suivantes qui valident "
"un nombre décimal sont fonctionnellement égales ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:800
2017-12-01 06:48:13 +00:00
msgid "Corresponds to the inline flag ``(?x)``."
2018-12-07 17:44:50 +00:00
msgstr "Correspond à l'option de groupe ``(?x)``."
2017-12-01 06:48:13 +00:00
#: library/re.rst:804
msgid "Functions"
msgstr ""
#: library/re.rst:808
msgid ""
"Compile a regular expression pattern into a :ref:`regular expression object "
"<re-objects>`, which can be used for matching using its :func:`~Pattern."
"match`, :func:`~Pattern.search` and other methods, described below."
msgstr ""
"Compile un motif vers une :ref:`expression rationnelle <re-objects>` "
"compilée, dont les méthodes :func:`~Pattern.match` et :func:`~Pattern."
"search`, décrites ci-dessous, peuvent être utilisées pour analyser des "
"textes."
#: library/re.rst:813
msgid ""
"The expression's behaviour can be modified by specifying a *flags* value. "
"Values can be any of the following variables, combined using bitwise OR (the "
"``|`` operator)."
msgstr ""
"Le comportement des expressions peut être modifié en spécifiant une valeur "
"*flags*. Les valeurs sont comprises dans les variables suivantes, et peuvent "
"être combinées avec un *ou* bit-à-bit (opérateur ``|``)."
#: library/re.rst:817
msgid "The sequence ::"
msgstr "La séquence ::"
#: library/re.rst:822
msgid "is equivalent to ::"
msgstr "est équivalente à ::"
#: library/re.rst:826
msgid ""
"but using :func:`re.compile` and saving the resulting regular expression "
"object for reuse is more efficient when the expression will be used several "
"times in a single program."
msgstr ""
"mais utiliser :func:`re.compile` et sauvegarder l'expression rationnelle "
"renvoyée pour la réutiliser est plus efficace quand l'expression est amenée "
"à être utilisée plusieurs fois dans un même programme."
#: library/re.rst:832
msgid ""
"The compiled versions of the most recent patterns passed to :func:`re."
"compile` and the module-level matching functions are cached, so programs "
"that use only a few regular expressions at a time needn't worry about "
"compiling regular expressions."
msgstr ""
"Les versions compilées des motifs les plus récents passés à :func:`re."
"compile` et autres fonctions d'analyse du module sont mises en cache, ainsi "
"les programmes qui n'utilisent que quelques expressions rationnelles en même "
"temps n'ont pas à s'inquiéter de la compilation de ces expressions."
#: library/re.rst:840
2016-10-30 09:46:26 +00:00
msgid ""
"Scan through *string* looking for the first location where the regular "
"expression *pattern* produces a match, and return a corresponding :ref:"
"`match object <match-objects>`. Return ``None`` if no position in the "
"string matches the pattern; note that this is different from finding a zero-"
"length match at some point in the string."
msgstr ""
2017-05-30 16:29:00 +00:00
"Analyse *string* à la recherche du premier emplacement où l'expression "
2017-05-31 07:14:34 +00:00
"rationnelle *pattern* trouve une correspondance, et renvoie l':ref:`objet de "
"correspondance <match-objects>` trouvé. Renvoie ``None`` si aucune position "
2017-05-30 16:29:00 +00:00
"dans la chaîne ne valide le motif ; notez que cela est différent de trouver "
"une correspondance avec une chaîne vide à un certain endroit de la chaîne."
2016-10-30 09:46:26 +00:00
#: library/re.rst:849
2016-10-30 09:46:26 +00:00
msgid ""
"If zero or more characters at the beginning of *string* match the regular "
"expression *pattern*, return a corresponding :ref:`match object <match-"
"objects>`. Return ``None`` if the string does not match the pattern; note "
"that this is different from a zero-length match."
msgstr ""
2017-05-31 07:14:34 +00:00
"Si zéro ou plus caractères au début de *string* correspondent à l'expression "
"rationnelle *pattern*, renvoie l':ref:`objet de correspondance <match-"
"objects>` trouvé. Renvoie ``None`` si la chaîne ne correspond pas au "
"motif ; notez que cela est différent d'une correspondance avec une chaîne "
"vide."
2016-10-30 09:46:26 +00:00
#: library/re.rst:854
2016-10-30 09:46:26 +00:00
msgid ""
"Note that even in :const:`MULTILINE` mode, :func:`re.match` will only match "
"at the beginning of the string and not at the beginning of each line."
msgstr ""
2017-05-30 16:29:00 +00:00
"Notez que même en mode :const:`MULTILINE`, :func:`re.match` ne validera "
"qu'au début de la chaîne et non au début de chaque ligne."
2016-10-30 09:46:26 +00:00
#: library/re.rst:857
2016-10-30 09:46:26 +00:00
msgid ""
"If you want to locate a match anywhere in *string*, use :func:`search` "
"instead (see also :ref:`search-vs-match`)."
msgstr ""
2017-05-31 07:14:34 +00:00
"Si vous voulez trouver une correspondance n'importe où dans *string*, "
"utilisez plutôt :func:`search` (voir aussi :ref:`search-vs-match`)."
2016-10-30 09:46:26 +00:00
#: library/re.rst:863
2016-10-30 09:46:26 +00:00
msgid ""
"If the whole *string* matches the regular expression *pattern*, return a "
"corresponding :ref:`match object <match-objects>`. Return ``None`` if the "
"string does not match the pattern; note that this is different from a zero-"
"length match."
msgstr ""
2017-05-31 07:14:34 +00:00
"Si l'entièreté de la chaîne *string* correspond à l'expression rationnelle "
"*pattern*, renvoie l':ref:`objet de correspondance <match-objects>` trouvé. "
"Renvoie ``None`` si la chaîne ne correspond pas au motif ; notez que cela "
"est différent d'une correspondance avec une chaîne vide."
2016-10-30 09:46:26 +00:00
#: library/re.rst:873
2016-10-30 09:46:26 +00:00
msgid ""
"Split *string* by the occurrences of *pattern*. If capturing parentheses "
"are used in *pattern*, then the text of all groups in the pattern are also "
"returned as part of the resulting list. If *maxsplit* is nonzero, at most "
"*maxsplit* splits occur, and the remainder of the string is returned as the "
"final element of the list. ::"
msgstr ""
"Sépare *string* selon les occurrences de *pattern*. Si des parenthèses de "
"capture sont utilisées dans *pattern*, alors les textes des groupes du motif "
"sont aussi renvoyés comme éléments de la liste résultante. Si *maxsplit* est "
"différent de zéro, il ne pourra y avoir plus de *maxsplit* séparations, et "
"le reste de la chaîne sera renvoyé comme le dernier élément de la liste. ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:888
2016-10-30 09:46:26 +00:00
msgid ""
"If there are capturing groups in the separator and it matches at the start "
"of the string, the result will start with an empty string. The same holds "
2017-12-01 06:48:13 +00:00
"for the end of the string::"
msgstr ""
"S'il y a des groupes de capture dans le séparateur et qu'ils trouvent une "
"correspondance au début de la chaîne, le résultat commencera par une chaîne "
"vide. La même chose se produit pour la fin de la chaîne ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:895
2016-10-30 09:46:26 +00:00
msgid ""
"That way, separator components are always found at the same relative indices "
"within the result list."
msgstr ""
2017-05-31 07:14:34 +00:00
"De cette manière, les séparateurs sont toujours trouvés aux mêmes indices "
"relatifs dans la liste résultante."
2016-10-30 09:46:26 +00:00
#: library/re.rst:898
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"Empty matches for the pattern split the string only when not adjacent to a "
"previous empty match."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-03-21 20:05:38 +00:00
"Les correspondances vides pour le motif scindent la chaîne de caractères "
"seulement lorsqu'ils ne sont pas adjacents à une correspondance vide "
"précédente."
2016-10-30 09:46:26 +00:00
#: library/re.rst:998 library/re.rst:1026
2016-10-30 09:46:26 +00:00
msgid "Added the optional flags argument."
2020-09-28 21:27:18 +00:00
msgstr "ajout de l'argument optionnel *flags*."
2016-10-30 09:46:26 +00:00
#: library/re.rst:911
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"Added support of splitting on a pattern that could match an empty string."
2016-10-30 09:46:26 +00:00
msgstr ""
2018-12-07 17:44:50 +00:00
"Gestion du découpage avec un motif qui pourrait correspondre à une chaine de "
"caractère vide."
2016-10-30 09:46:26 +00:00
#: library/re.rst:917
2016-10-30 09:46:26 +00:00
msgid ""
"Return all non-overlapping matches of *pattern* in *string*, as a list of "
"strings or tuples. The *string* is scanned left-to-right, and matches are "
"returned in the order found. Empty matches are included in the result."
2016-10-30 09:46:26 +00:00
msgstr ""
"Renvoie toutes les correspondances, sans chevauchements, entre le motif "
"*pattern* et la chaîne *string*, comme une liste de chaînes ou de *n*-"
"uplets. La chaîne *string* est examinée de gauche à droite, et les "
"correspondances sont données dans cet ordre. Le résultat peut contenir des "
"correspondances vides."
2016-10-30 09:46:26 +00:00
#: library/re.rst:921
msgid ""
"The result depends on the number of capturing groups in the pattern. If "
"there are no groups, return a list of strings matching the whole pattern. "
"If there is exactly one group, return a list of strings matching that "
"group. If multiple groups are present, return a list of tuples of strings "
"matching the groups. Non-capturing groups do not affect the form of the "
"result."
msgstr ""
"Le type du résultat dépend du nombre de groupes capturants dans le motif. "
"S'il n'y en a pas, le résultat est une liste de sous-chaînes de caractères "
"qui correspondent au motif. S'il y a exactement un groupe, le résultat est "
"une liste constituée des sous-chaînes qui correspondaient à ce groupe pour "
"chaque correspondance entre le motif et la chaîne. S'il y a plusieurs "
"groupes, le résultat est formé de *n*-uplets avec les sous-chaînes "
"correspondant aux différents groupes."
#: library/re.rst:944
2018-06-28 13:32:56 +00:00
msgid "Non-empty matches can now start just after a previous empty match."
2018-01-04 14:57:05 +00:00
msgstr ""
2019-03-21 20:05:38 +00:00
"Les correspondances non vides peuvent maintenant démarrer juste après une "
"correspondance vide précédente."
2018-01-04 14:57:05 +00:00
#: library/re.rst:939
2016-10-30 09:46:26 +00:00
msgid ""
"Return an :term:`iterator` yielding :ref:`match objects <match-objects>` "
"over all non-overlapping matches for the RE *pattern* in *string*. The "
"*string* is scanned left-to-right, and matches are returned in the order "
2018-06-28 13:32:56 +00:00
"found. Empty matches are included in the result."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-31 15:39:30 +00:00
"Renvoie un :term:`iterator` produisant des :ref:`objets de correspondance "
"<match-objects>` pour toutes les correspondances non chevauchantes de "
"l'expression rationnelle *pattern* sur la chaîne *string*. *string* est "
"analysée de la gauche vers la droite, et les correspondances sont renvoyées "
"dans l'ordre où elles sont trouvées. Les correspondances vides sont "
"incluses dans le résultat."
2016-10-30 09:46:26 +00:00
#: library/re.rst:950
2016-10-30 09:46:26 +00:00
msgid ""
"Return the string obtained by replacing the leftmost non-overlapping "
"occurrences of *pattern* in *string* by the replacement *repl*. If the "
"pattern isn't found, *string* is returned unchanged. *repl* can be a string "
"or a function; if it is a string, any backslash escapes in it are "
"processed. That is, ``\\n`` is converted to a single newline character, "
"``\\r`` is converted to a carriage return, and so forth. Unknown escapes of "
2019-03-20 08:02:55 +00:00
"ASCII letters are reserved for future use and treated as errors. Other "
"unknown escapes such as ``\\&`` are left alone. Backreferences, such as "
"``\\6``, are replaced with the substring matched by group 6 in the pattern. "
2019-03-20 08:02:55 +00:00
"For example::"
msgstr ""
"Renvoie la chaîne obtenue en remplaçant les occurrences (sans chevauchement) "
"les plus à gauche de *pattern* dans *string* par le remplacement *repl*. Si "
"le motif n'est pas trouvé, *string* est renvoyée inchangée. *repl* peut "
"être une chaîne de caractères ou une fonction ; si c'est une chaîne, toutes "
"les séquences d'échappement qu'elle contient sont traduites. Ainsi, ``\\n`` "
"est convertie en un simple saut de ligne, ``\\r`` en un retour chariot, et "
2019-04-03 22:14:39 +00:00
"ainsi de suite. Les échappements inconnus de lettres ASCII sont réservés "
"pour une utilisation future et sont considérés comme des erreurs. Les autres "
"échappements tels que ``\\&`` sont laissés intacts. Les références arrières, "
"telles que ``\\6``, sont remplacées par la sous-chaîne correspondant au "
"groupe 6 dans le motif. Par exemple ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:966
2016-10-30 09:46:26 +00:00
msgid ""
"If *repl* is a function, it is called for every non-overlapping occurrence "
2017-12-01 06:48:13 +00:00
"of *pattern*. The function takes a single :ref:`match object <match-"
"objects>` argument, and returns the replacement string. For example::"
msgstr ""
"Si *repl* est une fonction, elle est appelée pour chaque occurrence non "
"chevauchante de *pattern*. La fonction prend comme argument un :ref:`objet "
"de correspondance <match-objects>`, et renvoie la chaîne de remplacement. "
"Par exemple ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:978
2017-12-01 06:48:13 +00:00
msgid "The pattern may be a string or a :ref:`pattern object <re-objects>`."
msgstr ""
"Le motif peut être une chaîne de caractères ou un :ref:`objet expression "
"rationnelle <re-objects>`."
2016-10-30 09:46:26 +00:00
#: library/re.rst:980
2016-10-30 09:46:26 +00:00
msgid ""
"The optional argument *count* is the maximum number of pattern occurrences "
"to be replaced; *count* must be a non-negative integer. If omitted or zero, "
"all occurrences will be replaced. Empty matches for the pattern are replaced "
2018-06-28 13:32:56 +00:00
"only when not adjacent to a previous empty match, so ``sub('x*', '-', "
"'abxd')`` returns ``'-a-b--d-'``."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-31 15:39:30 +00:00
"L'argument optionnel *count* est le nombre maximum d'occurrences du motif à "
"remplacer : *count* ne doit pas être un nombre négatif. Si omis ou nul, "
"toutes les occurrences seront remplacées. Les correspondances vides avec le "
"motif sont remplacées uniquement quand elles ne sont pas adjacentes à une "
"précédente correspondance, ainsi ``sub('x*', '-', 'abxd')`` renvoie ``'-a-b--"
"d-'``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:988
2016-10-30 09:46:26 +00:00
msgid ""
"In string-type *repl* arguments, in addition to the character escapes and "
"backreferences described above, ``\\g<name>`` will use the substring matched "
"by the group named ``name``, as defined by the ``(?P<name>...)`` syntax. "
"``\\g<number>`` uses the corresponding group number; ``\\g<2>`` is therefore "
"equivalent to ``\\2``, but isn't ambiguous in a replacement such as "
"``\\g<2>0``. ``\\20`` would be interpreted as a reference to group 20, not "
"a reference to group 2 followed by the literal character ``'0'``. The "
2016-10-30 09:46:26 +00:00
"backreference ``\\g<0>`` substitutes in the entire substring matched by the "
"RE."
msgstr ""
2017-05-31 15:39:30 +00:00
"Dans les arguments *repl* de type *string*, en plus des séquences "
"d'échappement et références arrières décrites au-dessus, ``\\g<name>`` "
"utilisera la sous-chaîne correspondant au groupe nommé ``name``, comme "
"défini par la syntaxe ``(?P<name>...)``. ``\\g<number>`` utilise le groupe "
"numéroté associé ; ``\\g<2>`` est ainsi équivalent à ``\\2``, mais n'est pas "
"ambigu dans un remplacement tel que ``\\g<2>0``, ``\\20`` serait interprété "
"comme une référence au groupe 20, et non une référence au groupe 2 suivie "
"par un caractère littéral ``'0'``. La référence arrière ``\\g<0>`` est "
"remplacée par la sous-chaîne entière validée par l'expression rationnelle."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1029 library/re.rst:1263
2016-10-30 09:46:26 +00:00
msgid "Unmatched groups are replaced with an empty string."
2017-05-31 15:39:30 +00:00
msgstr "Les groupes sans correspondance sont remplacés par une chaîne vide."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1004
2017-04-02 20:14:06 +00:00
msgid ""
"Unknown escapes in *pattern* consisting of ``'\\'`` and an ASCII letter now "
"are errors."
msgstr ""
2017-05-31 15:39:30 +00:00
"Les séquences d'échappement inconnues dans *pattern* formées par ``'\\'`` et "
"une lettre ASCII sont maintenant des erreurs."
2017-04-02 20:14:06 +00:00
#: library/re.rst:1008
2017-04-02 20:14:06 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"Unknown escapes in *repl* consisting of ``'\\'`` and an ASCII letter now are "
"errors."
msgstr ""
"Les séquences d'échappement inconnues dans *repl* formées par ``'\\'`` et "
2018-06-28 13:32:56 +00:00
"une lettre ASCII sont maintenant des erreurs."
#: library/re.rst:1012
2018-06-28 13:32:56 +00:00
msgid ""
"Empty matches for the pattern are replaced when adjacent to a previous non-"
"empty match."
2017-04-02 20:14:06 +00:00
msgstr ""
2019-03-21 20:05:38 +00:00
"Les correspondances vides pour le motif sont remplacées lorsqu'elles sont "
"adjacentes à une correspondance non vide précédente."
2017-04-02 20:14:06 +00:00
#: library/re.rst:1016
2022-05-22 21:15:02 +00:00
msgid ""
"Group *id* containing anything except ASCII digits. Group names containing "
"non-ASCII characters in bytes replacement strings."
msgstr ""
"Identifiant de groupe contenant autre chose que des chiffres ASCII. Les noms "
"de groupe contenant des caractères non ASCII dans des chaînes de "
"remplacement d'octets."
2022-05-22 21:15:02 +00:00
#: library/re.rst:1023
2016-10-30 09:46:26 +00:00
msgid ""
"Perform the same operation as :func:`sub`, but return a tuple ``(new_string, "
"number_of_subs_made)``."
msgstr ""
"Réalise la même opération que :func:`sub`, mais renvoie une paire "
2017-05-31 15:39:30 +00:00
"``(nouvelle_chaîne, nombre_de_substitutions_réalisées)``."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1035
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"Escape special characters in *pattern*. This is useful if you want to match "
"an arbitrary literal string that may have regular expression metacharacters "
"in it. For example::"
2016-10-30 09:46:26 +00:00
msgstr ""
"Échappe tous les caractères spéciaux de *pattern*. Cela est utile si vous "
"voulez valider une quelconque chaîne littérale qui pourrait contenir des "
"métacaractères d'expressions rationnelles. Par exemple ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1050
2017-12-01 06:48:13 +00:00
msgid ""
2019-09-04 09:35:23 +00:00
"This function must not be used for the replacement string in :func:`sub` "
2017-12-01 06:48:13 +00:00
"and :func:`subn`, only backslashes should be escaped. For example::"
msgstr ""
"Cette fonction ne doit pas être utilisée pour la chaîne de remplacement "
"dans :func:`sub` et :func:`subn`, seuls les antislashs devraient être "
2018-12-07 17:44:50 +00:00
"échappés. Par exemple ::"
2017-12-01 06:48:13 +00:00
#: library/re.rst:1058
2016-10-30 09:46:26 +00:00
msgid "The ``'_'`` character is no longer escaped."
2017-05-31 15:39:30 +00:00
msgstr "Le caractère ``'_'`` n'est plus échappé."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1061
2018-06-28 13:32:56 +00:00
msgid ""
"Only characters that can have special meaning in a regular expression are "
2019-10-09 16:10:12 +00:00
"escaped. As a result, ``'!'``, ``'\"'``, ``'%'``, ``\"'\"``, ``','``, "
"``'/'``, ``':'``, ``';'``, ``'<'``, ``'='``, ``'>'``, ``'@'``, and ``\"`\"`` "
"are no longer escaped."
2018-06-28 13:32:56 +00:00
msgstr ""
"Seuls les caractères qui peuvent avoir une signification spéciale dans une "
"expression rationnelle sont échappés. De ce fait, ``'!'``, ``'\"'``, "
"``'%'``, ``\"'\"``, ``','``, ``'/'``, ``':'``, ``';'``, ``'<'``, ``'='``, "
"``'>'``, ``'@'``, et ``\"`\"`` ne sont plus échappés."
2018-06-28 13:32:56 +00:00
#: library/re.rst:1070
2016-10-30 09:46:26 +00:00
msgid "Clear the regular expression cache."
2017-05-31 15:39:30 +00:00
msgstr "Vide le cache d'expressions rationnelles."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1074
msgid "Exceptions"
msgstr ""
#: library/re.rst:1078
2016-10-30 09:46:26 +00:00
msgid ""
"Exception raised when a string passed to one of the functions here is not a "
"valid regular expression (for example, it might contain unmatched "
"parentheses) or when some other error occurs during compilation or "
"matching. It is never an error if a string contains no match for a "
"pattern. The error instance has the following additional attributes:"
msgstr ""
2017-05-31 15:39:30 +00:00
"Exception levée quand une chaîne passée à l'une des fonctions ici présentes "
"n'est pas une expression rationnelle valide (contenant par exemple une "
"parenthèse non fermée) ou quand d'autres erreurs se produisent durant la "
"compilation ou l'analyse. Il ne se produit jamais d'erreur si une chaîne ne "
"contient aucune correspondance pour un motif. Les instances de l'erreur ont "
"les attributs additionnels suivants :"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1086
2016-10-30 09:46:26 +00:00
msgid "The unformatted error message."
2017-08-17 15:25:53 +00:00
msgstr "Le message d'erreur non formaté."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1090
2016-10-30 09:46:26 +00:00
msgid "The regular expression pattern."
2017-05-31 15:39:30 +00:00
msgstr "Le motif d'expression rationnelle."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1094
2017-08-01 11:29:09 +00:00
msgid "The index in *pattern* where compilation failed (may be ``None``)."
2017-08-01 12:16:10 +00:00
msgstr ""
"L'index dans *pattern* où la compilation a échoué (peut valoir ``None``)."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1098
2017-08-01 11:29:09 +00:00
msgid "The line corresponding to *pos* (may be ``None``)."
2017-08-01 12:16:10 +00:00
msgstr "La ligne correspondant à *pos* (peut valoir ``None``)."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1102
2017-08-01 11:29:09 +00:00
msgid "The column corresponding to *pos* (may be ``None``)."
2017-08-01 12:16:10 +00:00
msgstr "La colonne correspondant à *pos* (peut valoir ``None``)."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1104
2016-10-30 09:46:26 +00:00
msgid "Added additional attributes."
2017-05-31 15:39:30 +00:00
msgstr "Ajout des attributs additionnels."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1110
2016-10-30 09:46:26 +00:00
msgid "Regular Expression Objects"
2017-05-31 15:39:30 +00:00
msgstr "Objets d'expressions rationnelles"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1112
2016-10-30 09:46:26 +00:00
msgid ""
"Compiled regular expression objects support the following methods and "
"attributes:"
msgstr ""
2017-05-31 15:39:30 +00:00
"Les expressions rationnelles compilées supportent les méthodes et attributs "
"suivants :"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1117
2016-10-30 09:46:26 +00:00
msgid ""
"Scan through *string* looking for the first location where this regular "
"expression produces a match, and return a corresponding :ref:`match object "
"<match-objects>`. Return ``None`` if no position in the string matches the "
"pattern; note that this is different from finding a zero-length match at "
"some point in the string."
msgstr ""
2017-05-31 15:39:30 +00:00
"Analyse *string* à la recherche du premier emplacement où l'expression "
"rationnelle trouve une correspondance, et envoie l':ref:`objet de "
"correspondance <match-objects>` trouvé. Renvoie ``None`` si aucune position "
"dans la chaîne ne satisfait le motif ; notez que cela est différent que de "
"trouver une correspondance vide dans la chaîne."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1123
2016-10-30 09:46:26 +00:00
msgid ""
"The optional second parameter *pos* gives an index in the string where the "
"search is to start; it defaults to ``0``. This is not completely equivalent "
"to slicing the string; the ``'^'`` pattern character matches at the real "
"beginning of the string and at positions just after a newline, but not "
"necessarily at the index where the search is to start."
msgstr ""
2017-05-31 15:39:30 +00:00
"Le second paramètre *pos* (optionnel) donne l'index dans la chaîne où la "
"recherche doit débuter ; il vaut ``0`` par défaut. Cela n'est pas "
"complètement équivalent à un *slicing* sur la chaîne ; le caractère de motif "
"``'^'`` correspond au début réel de la chaîne et aux positions juste après "
"un saut de ligne, mais pas nécessairement à l'index où la recherche commence."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1129
2016-10-30 09:46:26 +00:00
msgid ""
"The optional parameter *endpos* limits how far the string will be searched; "
"it will be as if the string is *endpos* characters long, so only the "
"characters from *pos* to ``endpos - 1`` will be searched for a match. If "
"*endpos* is less than *pos*, no match will be found; otherwise, if *rx* is a "
"compiled regular expression object, ``rx.search(string, 0, 50)`` is "
2017-12-01 06:48:13 +00:00
"equivalent to ``rx.search(string[:50], 0)``. ::"
msgstr ""
"Le paramètre optionnel *endpos* limite la longueur sur laquelle la chaîne "
"sera analysée ; ce sera comme si la chaîne faisait *endpos* caractères de "
"long, donc uniquement les caractères de *pos* à ``endpos - 1`` seront "
"analysés pour trouver une correspondance. Si *endpos* est inférieur à "
"*pos*, aucune correspondance ne sera trouvée ; dit autrement, avec *rx* une "
"expression rationnelle compilée, ``rx.search(string, 0, 50)`` est équivalent "
"à ``rx.search(string[:50], 0)``. ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1144
2016-10-30 09:46:26 +00:00
msgid ""
"If zero or more characters at the *beginning* of *string* match this regular "
"expression, return a corresponding :ref:`match object <match-objects>`. "
"Return ``None`` if the string does not match the pattern; note that this is "
"different from a zero-length match."
msgstr ""
2017-06-01 07:16:45 +00:00
"Si zéro caractère ou plus au début de *string* correspondent à cette "
"expression rationnelle, renvoie l':ref:`objet de correspondance <match-"
"objects>` trouvé. Renvoie ``None`` si la chaîne ne correspond pas au motif ; "
"notez que cela est différent d'une correspondance vide."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1167
2016-10-30 09:46:26 +00:00
msgid ""
"The optional *pos* and *endpos* parameters have the same meaning as for the :"
2018-06-28 13:32:56 +00:00
"meth:`~Pattern.search` method. ::"
msgstr ""
"Les paramètres optionnels *pos* et *endpos* ont le même sens que pour la "
"méthode :meth:`~Pattern.search`. ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1157
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"If you want to locate a match anywhere in *string*, use :meth:`~Pattern."
2016-10-30 09:46:26 +00:00
"search` instead (see also :ref:`search-vs-match`)."
msgstr ""
2017-06-01 07:16:45 +00:00
"Si vous voulez une recherche n'importe où dans *string*, utilisez plutôt :"
"meth:`~Pattern.search` (voir aussi :ref:`search-vs-match`)."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1163
2016-10-30 09:46:26 +00:00
msgid ""
"If the whole *string* matches this regular expression, return a "
"corresponding :ref:`match object <match-objects>`. Return ``None`` if the "
"string does not match the pattern; note that this is different from a zero-"
"length match."
msgstr ""
2017-06-01 07:16:45 +00:00
"Si la chaîne *string* entière valide l'expression rationnelle, renvoie l':"
2017-08-08 07:50:04 +00:00
"ref:`object de correspondance <match-objects>` associé. Renvoie ``None`` si "
2017-06-01 07:16:45 +00:00
"la chaîne ne correspond pas au motif ; notez que cela est différent d'une "
"correspondance vide."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1181
2016-10-30 09:46:26 +00:00
msgid "Identical to the :func:`split` function, using the compiled pattern."
2017-06-01 07:16:45 +00:00
msgstr "Identique à la fonction :func:`split`, en utilisant le motif compilé."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1186
2016-10-30 09:46:26 +00:00
msgid ""
"Similar to the :func:`findall` function, using the compiled pattern, but "
"also accepts optional *pos* and *endpos* parameters that limit the search "
2017-12-01 06:48:13 +00:00
"region like for :meth:`search`."
msgstr ""
"Similaire à la fonction :func:`findall`, en utilisant le motif compilé, mais "
"accepte aussi des paramètres *pos* et *endpos* optionnels qui limitent la "
"région de recherche comme pour :meth:`search`."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1193
2016-10-30 09:46:26 +00:00
msgid ""
"Similar to the :func:`finditer` function, using the compiled pattern, but "
"also accepts optional *pos* and *endpos* parameters that limit the search "
2017-12-01 06:48:13 +00:00
"region like for :meth:`search`."
msgstr ""
"Similaire à la fonction :func:`finditer`, en utilisant le motif compilé, "
"mais accepte aussi des paramètres *pos* et *endpos* optionnels qui limitent "
"la région de recherche comme pour :meth:`search`."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1200
2016-10-30 09:46:26 +00:00
msgid "Identical to the :func:`sub` function, using the compiled pattern."
2017-05-31 07:14:34 +00:00
msgstr "Identique à la fonction :func:`sub`, en utilisant le motif compilé."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1205
2016-10-30 09:46:26 +00:00
msgid "Identical to the :func:`subn` function, using the compiled pattern."
2017-05-31 07:14:34 +00:00
msgstr "Identique à la fonction :func:`subn`, en utilisant le motif compilé."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1210
2016-10-30 09:46:26 +00:00
msgid ""
"The regex matching flags. This is a combination of the flags given to :func:"
"`.compile`, any ``(?...)`` inline flags in the pattern, and implicit flags "
"such as :data:`UNICODE` if the pattern is a Unicode string."
msgstr ""
2017-05-31 07:14:34 +00:00
"Les options de validation de l'expression rationnelle. Il s'agit d'une "
"combinaison des options données à :func:`compile`, des potentielles options "
"``(?...)`` dans le motif, et des options implicites comme :data:`UNICODE` si "
"le motif est une chaîne Unicode."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1217
2016-10-30 09:46:26 +00:00
msgid "The number of capturing groups in the pattern."
msgstr "Le nombre de groupes de capture dans le motif."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1222
2016-10-30 09:46:26 +00:00
msgid ""
"A dictionary mapping any symbolic group names defined by ``(?P<id>)`` to "
"group numbers. The dictionary is empty if no symbolic groups were used in "
"the pattern."
msgstr ""
2017-05-31 07:14:34 +00:00
"Un dictionnaire associant les noms de groupes symboliques définis par ``(?"
"P<id>)`` aux groupes numérotés. Le dictionnaire est vide si aucun groupe "
"symbolique n'est utilisé dans le motif."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1229
2018-06-28 13:32:56 +00:00
msgid "The pattern string from which the pattern object was compiled."
msgstr "La chaîne de motif depuis laquelle l'objet motif a été compilé."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1232
2018-06-28 13:32:56 +00:00
msgid ""
"Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Compiled "
"regular expression objects are considered atomic."
msgstr ""
"Ajout du support des fonctions :func:`copy.copy` et :func:`copy.deepcopy`. "
"Les expressions régulières compilées sont considérées atomiques."
2018-06-28 13:32:56 +00:00
#: library/re.rst:1240
2016-10-30 09:46:26 +00:00
msgid "Match Objects"
2017-05-31 07:14:34 +00:00
msgstr "Objets de correspondance"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1242
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"Match objects always have a boolean value of ``True``. Since :meth:`~Pattern."
"match` and :meth:`~Pattern.search` return ``None`` when there is no match, "
"you can test whether there was a match with a simple ``if`` statement::"
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-31 07:14:34 +00:00
"Les objets de correspondance ont toujours une valeur booléenne ``True``. "
"Puisque :meth:`~Pattern.match` et :meth:`~Pattern.search` renvoient ``None`` "
2017-05-31 07:14:34 +00:00
"quand il n'y a pas de correspondance, vous pouvez tester s'il y a eu "
"correspondance avec une simple instruction ``if`` ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1251
2016-10-30 09:46:26 +00:00
msgid "Match objects support the following methods and attributes:"
msgstr ""
2017-05-31 07:14:34 +00:00
"Les objets de correspondance supportent les méthodes et attributs suivants :"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1256
2016-10-30 09:46:26 +00:00
msgid ""
"Return the string obtained by doing backslash substitution on the template "
2018-06-28 13:32:56 +00:00
"string *template*, as done by the :meth:`~Pattern.sub` method. Escapes such "
"as ``\\n`` are converted to the appropriate characters, and numeric "
"backreferences (``\\1``, ``\\2``) and named backreferences (``\\g<1>``, "
"``\\g<name>``) are replaced by the contents of the corresponding group."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-31 07:14:34 +00:00
"Renvoie la chaîne obtenue en substituant les séquences d'échappement du "
"gabarit *template*, comme réalisé par la méthode :meth:`~Pattern.sub`. Les "
2017-05-31 07:14:34 +00:00
"séquences comme ``\\n`` sont converties vers les caractères appropriés, et "
"les références arrières numériques (``\\1``, ``\\2``) et nommées "
"(``\\g<1>``, ``\\g<name>``) sont remplacées par les contenus des groupes "
2017-05-31 07:14:34 +00:00
"correspondant."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1268
2016-10-30 09:46:26 +00:00
msgid ""
"Returns one or more subgroups of the match. If there is a single argument, "
"the result is a single string; if there are multiple arguments, the result "
"is a tuple with one item per argument. Without arguments, *group1* defaults "
"to zero (the whole match is returned). If a *groupN* argument is zero, the "
"corresponding return value is the entire matching string; if it is in the "
"inclusive range [1..99], it is the string matching the corresponding "
"parenthesized group. If a group number is negative or larger than the "
"number of groups defined in the pattern, an :exc:`IndexError` exception is "
"raised. If a group is contained in a part of the pattern that did not match, "
"the corresponding result is ``None``. If a group is contained in a part of "
2017-12-01 06:48:13 +00:00
"the pattern that matched multiple times, the last match is returned. ::"
msgstr ""
"Renvoie un ou plus sous-groupes de la correspondance. Si un seul argument "
"est donné, le résultat est une chaîne simple ; s'il y a plusieurs arguments, "
"le résultat est un *n*-uplet comprenant un élément par argument. Sans "
"arguments, *group1* vaut par défaut zéro (la correspondance entière est "
"renvoyée). Si un argument *groupN* vaut zéro, l'élément associé sera la "
"chaîne de correspondance entière ; s'il est dans l'intervalle fermé [1..99], "
"c'est la correspondance avec le groupe de parenthèses associé. Si un numéro "
"de groupe est négatif ou supérieur au nombre de groupes définis dans le "
"motif, une exception :exc:`indexError` est levée. Si un groupe est contenu "
"dans une partie du motif qui n'a aucune correspondance, l'élément associé "
"sera ``None``. Si un groupe est contenu dans une partie du motif qui a "
"plusieurs correspondances, seule la dernière correspondance est renvoyée. ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1290
2016-10-30 09:46:26 +00:00
msgid ""
"If the regular expression uses the ``(?P<name>...)`` syntax, the *groupN* "
"arguments may also be strings identifying groups by their group name. If a "
"string argument is not used as a group name in the pattern, an :exc:"
"`IndexError` exception is raised."
msgstr ""
2017-05-31 07:14:34 +00:00
"Si l'expression rationnelle utilise la syntaxe ``(?P<name>...)``, les "
"arguments *groupN* peuvent alors aussi être des chaînes identifiant les "
"groupes par leurs noms. Si une chaîne donnée en argument n'est pas utilisée "
"comme nom de groupe dans le motif, une exception :exc:`IndexError` est levée."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1295
2017-12-01 06:48:13 +00:00
msgid "A moderately complicated example::"
2017-12-03 13:00:24 +00:00
msgstr "Un exemple modérément compliqué ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1303
2017-12-01 06:48:13 +00:00
msgid "Named groups can also be referred to by their index::"
2017-12-03 13:00:24 +00:00
msgstr "Les groupes nommés peuvent aussi être référencés par leur index ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1310
2017-12-01 06:48:13 +00:00
msgid "If a group matches multiple times, only the last match is accessible::"
msgstr ""
"Si un groupe a plusieurs correspondances, seule la dernière est accessible ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1319
2016-10-30 09:46:26 +00:00
msgid ""
"This is identical to ``m.group(g)``. This allows easier access to an "
2017-12-01 06:48:13 +00:00
"individual group from a match::"
msgstr ""
"Cela est identique à ``m.group(g)``. Cela permet un accès plus facile à un "
"groupe individuel depuis une correspondance ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1330
msgid "Named groups are supported as well::"
msgstr ""
#: library/re.rst:1343
2016-10-30 09:46:26 +00:00
msgid ""
"Return a tuple containing all the subgroups of the match, from 1 up to "
"however many groups are in the pattern. The *default* argument is used for "
"groups that did not participate in the match; it defaults to ``None``."
msgstr ""
"Renvoie un *n*-uplet contenant tous les sous-groupes de la correspondance, "
"de 1 jusqu'au nombre de groupes dans le motif. L'argument *default* est "
2017-05-31 07:14:34 +00:00
"utilisé pour les groupes sans correspondance ; il vaut ``None`` par défaut."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1572
2017-12-01 06:48:13 +00:00
msgid "For example::"
msgstr "Par exemple ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1353
2016-10-30 09:46:26 +00:00
msgid ""
"If we make the decimal place and everything after it optional, not all "
"groups might participate in the match. These groups will default to "
2017-12-01 06:48:13 +00:00
"``None`` unless the *default* argument is given::"
msgstr ""
"Si on rend la partie décimale et tout ce qui la suit optionnels, tous les "
"groupes ne figureront pas dans la correspondance. Ces groupes sans "
"correspondance vaudront ``None`` sauf si une autre valeur est donnée à "
"l'argument *default* ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1366
2016-10-30 09:46:26 +00:00
msgid ""
"Return a dictionary containing all the *named* subgroups of the match, keyed "
"by the subgroup name. The *default* argument is used for groups that did "
2017-12-01 06:48:13 +00:00
"not participate in the match; it defaults to ``None``. For example::"
msgstr ""
"Renvoie un dictionnaire contenant tous les sous-groupes *nommés* de la "
"correspondance, accessibles par leurs noms. L'argument *default* est "
"utilisé pour les groupes qui ne figurent pas dans la correspondance ; il "
"vaut ``None`` par défaut. Par exemple ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1378
2016-10-30 09:46:26 +00:00
msgid ""
"Return the indices of the start and end of the substring matched by *group*; "
"*group* defaults to zero (meaning the whole matched substring). Return "
"``-1`` if *group* exists but did not contribute to the match. For a match "
"object *m*, and a group *g* that did contribute to the match, the substring "
"matched by group *g* (equivalent to ``m.group(g)``) is ::"
msgstr ""
2017-06-01 07:16:45 +00:00
"Renvoie les indices de début et de fin de la sous-chaîne correspondant au "
"groupe *group* ; *group* vaut par défaut zéro (pour récupérer les indices de "
"la correspondance complète). Renvoie ``-1`` si *group* existe mais ne figure "
"pas dans la correspondance. Pour un objet de correspondance *m*, et un "
"groupe *g* qui y figure, la sous-chaîne correspondant au groupe *g* "
"(équivalente à ``m.group(g)``) est ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1386
2016-10-30 09:46:26 +00:00
msgid ""
"Note that ``m.start(group)`` will equal ``m.end(group)`` if *group* matched "
"a null string. For example, after ``m = re.search('b(c?)', 'cba')``, ``m."
"start(0)`` is 1, ``m.end(0)`` is 2, ``m.start(1)`` and ``m.end(1)`` are both "
"2, and ``m.start(2)`` raises an :exc:`IndexError` exception."
msgstr ""
2017-06-01 07:16:45 +00:00
"Notez que ``m.start(group)`` sera égal à ``m.end(group)`` si *group* "
"correspond à une chaîne vide. Par exemple, après ``m = re.search('b(c?)', "
"'cba')``, ``m.start(0)`` vaut 1, ``m.end(0)`` vaut 2, ``m.start(1)`` et ``m."
"end(1)`` valent tous deux 2, et ``m.start(2)`` lève une exception :exc:"
"`IndexError`."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1391
2017-12-01 06:48:13 +00:00
msgid "An example that will remove *remove_this* from email addresses::"
msgstr "Un exemple qui supprimera *remove_this* d'une adresse mail ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1401
2016-10-30 09:46:26 +00:00
msgid ""
"For a match *m*, return the 2-tuple ``(m.start(group), m.end(group))``. Note "
"that if *group* did not contribute to the match, this is ``(-1, -1)``. "
"*group* defaults to zero, the entire match."
msgstr ""
"Pour un objet de correspondance *m*, renvoie la paire ``(m.start(group), m."
2017-06-01 07:16:45 +00:00
"end(group))``. Notez que si *group* ne figure pas dans la correspondance, "
"``(-1, -1)`` est renvoyé. *group* vaut par défaut zéro, pour la "
"correspondance entière."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1408
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"The value of *pos* which was passed to the :meth:`~Pattern.search` or :meth:"
"`~Pattern.match` method of a :ref:`regex object <re-objects>`. This is the "
2016-10-30 09:46:26 +00:00
"index into the string at which the RE engine started looking for a match."
msgstr ""
"La valeur de *pos* qui a été passée à la méthode :meth:`~Pattern.search` ou :"
"meth:`~Pattern.match` d'un :ref:`objet expression rationnelle <re-"
"objects>`. C'est l'index dans la chaîne à partir duquel le moteur "
"d'expressions rationnelles recherche une correspondance."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1415
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"The value of *endpos* which was passed to the :meth:`~Pattern.search` or :"
"meth:`~Pattern.match` method of a :ref:`regex object <re-objects>`. This is "
"the index into the string beyond which the RE engine will not go."
2016-10-30 09:46:26 +00:00
msgstr ""
"La valeur de *endpos* qui a été passée à la méthode :meth:`~Pattern.search` "
"ou :meth:`~Pattern.match` d'un :ref:`objet expression rationnelle <re-"
2017-06-01 07:16:45 +00:00
"objects>`. C'est l'index dans la chaîne que le moteur d'expressions "
"rationnelles ne dépassera pas."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1422
2016-10-30 09:46:26 +00:00
msgid ""
"The integer index of the last matched capturing group, or ``None`` if no "
"group was matched at all. For example, the expressions ``(a)b``, ``((a)"
"(b))``, and ``((ab))`` will have ``lastindex == 1`` if applied to the string "
"``'ab'``, while the expression ``(a)(b)`` will have ``lastindex == 2``, if "
"applied to the same string."
msgstr ""
2017-06-01 07:16:45 +00:00
"L'index entier du dernier groupe de capture validé, ou ``None`` si aucun "
"groupe ne correspondait. Par exemple, les expressions ``(a)b``, ``((a)(b))`` "
"et ``((ab))`` auront un ``lastindex == 1`` si appliquées à la chaîne "
"``'ab'``, alors que l'expression ``(a)(b)`` aura un ``lastindex == 2`` si "
"appliquée à la même chaîne."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1431
2016-10-30 09:46:26 +00:00
msgid ""
"The name of the last matched capturing group, or ``None`` if the group "
"didn't have a name, or if no group was matched at all."
msgstr ""
2017-06-01 07:16:45 +00:00
"Le nom du dernier groupe capturant validé, ou ``None`` si le groupe n'a pas "
"de nom, ou si aucun groupe ne correspondait."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1437
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"The :ref:`regular expression object <re-objects>` whose :meth:`~Pattern."
"match` or :meth:`~Pattern.search` method produced this match instance."
msgstr ""
":ref:`L'expression rationnelle <re-objects>` dont la méthode :meth:`~Pattern."
"match` ou :meth:`~Pattern.search` a produit cet objet de correspondance."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1443
2018-06-28 13:32:56 +00:00
msgid "The string passed to :meth:`~Pattern.match` or :meth:`~Pattern.search`."
msgstr "La chaîne passée à :meth:`~Pattern.match` ou :meth:`~Pattern.search`."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1446
2018-06-28 13:32:56 +00:00
msgid ""
"Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Match objects "
"are considered atomic."
msgstr ""
"Ajout du support des fonctions :func:`copy.copy` et :func:`copy.deepcopy`. "
2018-12-07 17:47:18 +00:00
"Les objets correspondants sont considérés atomiques."
2018-06-28 13:32:56 +00:00
#: library/re.rst:1454
2016-10-30 09:46:26 +00:00
msgid "Regular Expression Examples"
2017-06-01 07:16:45 +00:00
msgstr "Exemples d'expressions rationnelles"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1458
2016-10-30 09:46:26 +00:00
msgid "Checking for a Pair"
2017-06-01 07:16:45 +00:00
msgstr "Rechercher une paire"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1460
2016-10-30 09:46:26 +00:00
msgid ""
"In this example, we'll use the following helper function to display match "
2019-09-04 09:35:23 +00:00
"objects a little more gracefully::"
2016-10-30 09:46:26 +00:00
msgstr ""
"Dans cet exemple, nous nous aidons de la fonction suivante pour afficher de "
"manière plus jolie les objets qui correspondent ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1468
2016-10-30 09:46:26 +00:00
msgid ""
"Suppose you are writing a poker program where a player's hand is represented "
"as a 5-character string with each character representing a card, \"a\" for "
"ace, \"k\" for king, \"q\" for queen, \"j\" for jack, \"t\" for 10, and "
"\"2\" through \"9\" representing the card with that value."
msgstr ""
2017-06-01 07:16:45 +00:00
"Supposez que vous écriviez un jeu de poker où la main d'un joueur est "
"représentée par une chaîne de 5 caractères avec chaque caractère "
2020-09-28 21:27:18 +00:00
"représentant une carte, « a » pour l'as, « k » pour le roi (*king*), « q » "
"pour la reine (*queen*), « j » pour le valet (*jack*), « t » pour 10 "
"(*ten*), et les caractères de « 2 » à « 9 » représentant les cartes avec ces "
2017-06-01 07:16:45 +00:00
"valeurs."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1473
2017-12-01 06:48:13 +00:00
msgid "To see if a given string is a valid hand, one could do the following::"
msgstr ""
"Pour vérifier qu'une chaîne donnée est une main valide, on pourrait faire "
"comme suit ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1483
2016-10-30 09:46:26 +00:00
msgid ""
"That last hand, ``\"727ak\"``, contained a pair, or two of the same valued "
"cards. To match this with a regular expression, one could use backreferences "
2017-12-01 06:48:13 +00:00
"as such::"
msgstr ""
"La dernière main, ``\"727ak\"``, contenait une paire, deux cartes de la même "
"valeur. Pour valider cela avec une expression rationnelle, on pourrait "
"utiliser des références arrière comme ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1493
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"To find out what card the pair consists of, one could use the :meth:`~Match."
2019-09-04 09:35:23 +00:00
"group` method of the match object in the following manner::"
2016-10-30 09:46:26 +00:00
msgstr ""
2017-06-01 07:16:45 +00:00
"Pour trouver de quelle carte est composée la paire, on pourrait utiliser la "
"méthode :meth:`~Match.group` de l'objet de correspondance de la manière "
"suivante ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1512
2016-10-30 09:46:26 +00:00
msgid "Simulating scanf()"
msgstr "Simuler *scanf()*"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1516
2016-10-30 09:46:26 +00:00
msgid ""
"Python does not currently have an equivalent to :c:func:`scanf`. Regular "
"expressions are generally more powerful, though also more verbose, than :c:"
"func:`scanf` format strings. The table below offers some more-or-less "
"equivalent mappings between :c:func:`scanf` format tokens and regular "
"expressions."
msgstr ""
2017-06-01 07:16:45 +00:00
"Python n'a actuellement pas d'équivalent à la fonction C :c:func:`scanf`. "
"Les expressions rationnelles sont généralement plus puissantes, mais aussi "
"plus verbeuses, que les chaînes de format :c:func:`scanf`. Le tableau "
"suivant présente des expressions rationnelles plus ou moins équivalentes aux "
"éléments de formats de :c:func:`scanf`."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1523
2016-10-30 09:46:26 +00:00
msgid ":c:func:`scanf` Token"
2017-06-01 07:16:45 +00:00
msgstr "Élément de :c:func:`scanf`"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1523
2016-10-30 09:46:26 +00:00
msgid "Regular Expression"
2017-06-01 07:16:45 +00:00
msgstr "Expression rationnelle"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1525
2016-10-30 09:46:26 +00:00
msgid "``%c``"
msgstr "``%c``"
#: library/re.rst:1527
2016-10-30 09:46:26 +00:00
msgid "``%5c``"
msgstr "``%5c``"
#: library/re.rst:1527
2016-10-30 09:46:26 +00:00
msgid "``.{5}``"
msgstr "``.{5}``"
#: library/re.rst:1529
2016-10-30 09:46:26 +00:00
msgid "``%d``"
msgstr "``%d``"
#: library/re.rst:1529
2016-10-30 09:46:26 +00:00
msgid "``[-+]?\\d+``"
msgstr "``[-+]?\\d+``"
#: library/re.rst:1531
2016-10-30 09:46:26 +00:00
msgid "``%e``, ``%E``, ``%f``, ``%g``"
msgstr "``%e``, ``%E``, ``%f``, ``%g``"
#: library/re.rst:1531
2016-10-30 09:46:26 +00:00
msgid "``[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?``"
msgstr "``[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?``"
#: library/re.rst:1533
2016-10-30 09:46:26 +00:00
msgid "``%i``"
msgstr "``%i``"
#: library/re.rst:1533
2016-10-30 09:46:26 +00:00
msgid "``[-+]?(0[xX][\\dA-Fa-f]+|0[0-7]*|\\d+)``"
msgstr "``[-+]?(0[xX][\\dA-Fa-f]+|0[0-7]*|\\d+)``"
#: library/re.rst:1535
2016-10-30 09:46:26 +00:00
msgid "``%o``"
msgstr "``%o``"
#: library/re.rst:1535
2016-10-30 09:46:26 +00:00
msgid "``[-+]?[0-7]+``"
msgstr "``[-+]?[0-7]+``"
#: library/re.rst:1537
2016-10-30 09:46:26 +00:00
msgid "``%s``"
msgstr "``%s``"
#: library/re.rst:1537
2016-10-30 09:46:26 +00:00
msgid "``\\S+``"
msgstr "``\\S+``"
#: library/re.rst:1539
2016-10-30 09:46:26 +00:00
msgid "``%u``"
msgstr "``%u``"
#: library/re.rst:1539
2016-10-30 09:46:26 +00:00
msgid "``\\d+``"
msgstr "``\\d+``"
#: library/re.rst:1541
2016-10-30 09:46:26 +00:00
msgid "``%x``, ``%X``"
msgstr "``%x``, ``%X``"
#: library/re.rst:1541
2016-10-30 09:46:26 +00:00
msgid "``[-+]?(0[xX])?[\\dA-Fa-f]+``"
msgstr "``[-+]?(0[xX])?[\\dA-Fa-f]+``"
#: library/re.rst:1544
2016-10-30 09:46:26 +00:00
msgid "To extract the filename and numbers from a string like ::"
msgstr ""
"Pour extraire le nom de fichier et les nombres depuis une chaîne comme ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1548
2016-10-30 09:46:26 +00:00
msgid "you would use a :c:func:`scanf` format like ::"
msgstr "vous utiliseriez un format :c:func:`scanf` comme ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1552
2016-10-30 09:46:26 +00:00
msgid "The equivalent regular expression would be ::"
msgstr "L'expression rationnelle équivalente serait ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1560
2016-10-30 09:46:26 +00:00
msgid "search() vs. match()"
msgstr "Comparaison de *search()* et *match()*"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1564
2016-10-30 09:46:26 +00:00
msgid ""
"Python offers different primitive operations based on regular expressions:"
2016-10-30 09:46:26 +00:00
msgstr ""
"Python offre différentes opérations primitives basées sur des expressions "
"régulières."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1566
msgid ":func:`re.match` checks for a match only at the beginning of the string"
msgstr ""
":func:`re.match` cherche une correspondance uniquement au début de la chaîne "
"de caractères"
#: library/re.rst:1567
msgid ""
":func:`re.search` checks for a match anywhere in the string (this is what "
"Perl does by default)"
msgstr ""
":func:`re.search` cherche une correspondance n'importe où dans la chaîne de "
"caractères (ce que fait Perl par défaut)"
#: library/re.rst:1569
msgid ":func:`re.fullmatch` checks for entire string to be a match"
msgstr ""
":func:`re.fullmatch` cherche une correspondance avec l'intégralité de la "
"chaîne de caractères."
#: library/re.rst:1581
2016-10-30 09:46:26 +00:00
msgid ""
"Regular expressions beginning with ``'^'`` can be used with :func:`search` "
"to restrict the match at the beginning of the string::"
msgstr ""
2017-06-01 07:16:45 +00:00
"Les expressions rationnelles commençant par ``'^'`` peuvent être utilisées "
"avec :func:`search` pour restreindre la recherche au début de la chaîne ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1589
2016-10-30 09:46:26 +00:00
msgid ""
"Note however that in :const:`MULTILINE` mode :func:`match` only matches at "
"the beginning of the string, whereas using :func:`search` with a regular "
2017-12-01 06:48:13 +00:00
"expression beginning with ``'^'`` will match at the beginning of each "
"line. ::"
msgstr ""
"Notez cependant qu'en mode :const:`MULTILINE`, :func:`match` ne recherche "
"qu'au début de la chaîne, alors que :func:`search` avec une expression "
"rationnelle commençant par ``'^'`` recherchera au début de chaque ligne. ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1599
2016-10-30 09:46:26 +00:00
msgid "Making a Phonebook"
2017-06-01 07:16:45 +00:00
msgstr "Construire un répertoire téléphonique"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1601
2016-10-30 09:46:26 +00:00
msgid ""
":func:`split` splits a string into a list delimited by the passed pattern. "
"The method is invaluable for converting textual data into data structures "
"that can be easily read and modified by Python as demonstrated in the "
"following example that creates a phonebook."
msgstr ""
2017-06-01 07:16:45 +00:00
":func:`split` découpe une chaîne en une liste délimitée par le motif donné. "
"La méthode est inestimable pour convertir des données textuelles vers des "
"structures de données qui peuvent être lues et modifiées par Python comme "
"démontré dans l'exemple suivant qui crée un répertoire téléphonique."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1606
2016-10-30 09:46:26 +00:00
msgid ""
"First, here is the input. Normally it may come from a file, here we are "
2019-09-04 09:35:23 +00:00
"using triple-quoted string syntax"
msgstr ""
"Tout d'abord, voici l'entrée. Elle provient normalement d'un fichier, nous "
"utilisons ici une chaîne à guillemets triples"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1619
2016-10-30 09:46:26 +00:00
msgid ""
"The entries are separated by one or more newlines. Now we convert the string "
"into a list with each nonempty line having its own entry:"
msgstr ""
2017-06-01 07:16:45 +00:00
"Les entrées sont séparées par un saut de ligne ou plus. Nous convertissons "
"maintenant la chaîne en une liste où chaque ligne non vide aura sa propre "
"entrée :"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1632
2016-10-30 09:46:26 +00:00
msgid ""
"Finally, split each entry into a list with first name, last name, telephone "
"number, and address. We use the ``maxsplit`` parameter of :func:`split` "
"because the address has spaces, our splitting pattern, in it:"
msgstr ""
2017-06-01 07:16:45 +00:00
"Finalement, on sépare chaque entrée en une liste avec prénom, nom, numéro de "
"téléphone et adresse. Nous utilisons le paramètre ``maxsplit`` de :func:"
"`split` parce que l'adresse contient des espaces, qui sont notre motif de "
"séparation :"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1645
2016-10-30 09:46:26 +00:00
msgid ""
"The ``:?`` pattern matches the colon after the last name, so that it does "
"not occur in the result list. With a ``maxsplit`` of ``4``, we could "
"separate the house number from the street name:"
msgstr ""
2017-06-01 07:16:45 +00:00
"Le motif ``:?`` trouve les deux points derrière le nom de famille, pour "
2017-09-22 15:50:23 +00:00
"qu'ils n'apparaissent pas dans la liste résultante. Avec un ``maxsplit`` de "
"``4``, nous pourrions séparer le numéro du nom de la rue :"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1660
2016-10-30 09:46:26 +00:00
msgid "Text Munging"
2017-06-01 07:16:45 +00:00
msgstr "Mélanger les lettres des mots"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1662
2016-10-30 09:46:26 +00:00
msgid ""
":func:`sub` replaces every occurrence of a pattern with a string or the "
"result of a function. This example demonstrates using :func:`sub` with a "
"function to \"munge\" text, or randomize the order of all the characters in "
"each word of a sentence except for the first and last characters::"
msgstr ""
2017-06-01 07:16:45 +00:00
":func:`sub` remplace toutes les occurrences d'un motif par une chaîne ou le "
"résultat d'une fonction. Cet exemple le montre, en utilisant :func:`sub` "
"avec une fonction qui mélange aléatoirement les caractères de chaque mot "
"dans une phrase (à l'exception des premiers et derniers caractères) ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1679
2016-10-30 09:46:26 +00:00
msgid "Finding all Adverbs"
2017-06-01 07:16:45 +00:00
msgstr "Trouver tous les adverbes"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1681
2016-10-30 09:46:26 +00:00
msgid ""
":func:`findall` matches *all* occurrences of a pattern, not just the first "
2018-06-28 13:32:56 +00:00
"one as :func:`search` does. For example, if a writer wanted to find all of "
"the adverbs in some text, they might use :func:`findall` in the following "
"manner::"
msgstr ""
":func:`findall` trouve *toutes* les occurrences d'un motif, pas juste la "
"première comme le fait :func:`search`. Par exemple, si un écrivain voulait "
"trouver tous les adverbes dans un texte, il devrait utiliser :func:`findall` "
"de la manière suivante ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1692
2016-10-30 09:46:26 +00:00
msgid "Finding all Adverbs and their Positions"
2017-06-01 07:16:45 +00:00
msgstr "Trouver tous les adverbes et leurs positions"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1694
2016-10-30 09:46:26 +00:00
msgid ""
"If one wants more information about all matches of a pattern than the "
"matched text, :func:`finditer` is useful as it provides :ref:`match objects "
"<match-objects>` instead of strings. Continuing with the previous example, "
2018-06-28 13:32:56 +00:00
"if a writer wanted to find all of the adverbs *and their positions* in some "
"text, they would use :func:`finditer` in the following manner::"
msgstr ""
"Pour obtenir plus d'informations sur les correspondances que juste le texte "
"trouvé, :func:`finditer` est utile en fournissant des :ref:`objets de "
"correspondance <match-objects>` plutôt que des chaînes. En continuant avec "
"l'exemple précédent, si l'écrivain voulait trouver tous les adverbes *et "
"leurs positions* dans un texte, il utiliserait :func:`finditer` de la "
"manière suivante ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1708
2016-10-30 09:46:26 +00:00
msgid "Raw String Notation"
msgstr "Notation brute de chaînes"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1710
2016-10-30 09:46:26 +00:00
msgid ""
"Raw string notation (``r\"text\"``) keeps regular expressions sane. Without "
"it, every backslash (``'\\'``) in a regular expression would have to be "
"prefixed with another one to escape it. For example, the two following "
2017-12-01 06:48:13 +00:00
"lines of code are functionally identical::"
msgstr ""
"La notation brute de chaînes (``r\"text\"``) garde saines les expressions "
"rationnelles. Sans elle, chaque *backslash* (``'\\'``) dans une expression "
"rationnelle devrait être préfixé d'un autre *backslash* pour l'échapper. "
"Par exemple, les deux lignes de code suivantes sont fonctionnellement "
"identiques ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1720
2016-10-30 09:46:26 +00:00
msgid ""
"When one wants to match a literal backslash, it must be escaped in the "
"regular expression. With raw string notation, this means ``r\"\\\\\"``. "
"Without raw string notation, one must use ``\"\\\\\\\\\"``, making the "
2017-12-01 06:48:13 +00:00
"following lines of code functionally identical::"
msgstr ""
"Pour rechercher un *backslash* littéral, il faut l'échapper dans "
"l'expression rationnelle. Avec la notation brute, cela signifie ``r\"\\\\"
"\"``. Sans elle, il faudrait utiliser ``\"\\\\\\\\\"``, faisant que les "
"deux lignes de code suivantes sont fonctionnellement identiques ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1732
2016-10-30 09:46:26 +00:00
msgid "Writing a Tokenizer"
2017-06-01 07:16:45 +00:00
msgstr "Écrire un analyseur lexical"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1734
2016-10-30 09:46:26 +00:00
msgid ""
"A `tokenizer or scanner <https://en.wikipedia.org/wiki/Lexical_analysis>`_ "
"analyzes a string to categorize groups of characters. This is a useful "
"first step in writing a compiler or interpreter."
msgstr ""
2017-06-01 07:16:45 +00:00
"Un `analyseur lexical ou scanner <https://en.wikipedia.org/wiki/"
"Lexical_analysis>`_ analyse une chaîne pour catégoriser les groupes de "
"caractères. C'est une première étape utile dans l'écriture d'un compilateur "
"ou d'un interpréteur."
2016-10-30 09:46:26 +00:00
#: library/re.rst:1738
2016-10-30 09:46:26 +00:00
msgid ""
"The text categories are specified with regular expressions. The technique "
"is to combine those into a single master regular expression and to loop over "
"successive matches::"
msgstr ""
2017-06-01 07:16:45 +00:00
"Les catégories de texte sont spécifiées par des expressions rationnelles. "
"La technique est de les combiner dans une unique expression rationnelle "
"maîtresse, et de boucler sur les correspondances successives ::"
2016-10-30 09:46:26 +00:00
#: library/re.rst:1794
2016-10-30 09:46:26 +00:00
msgid "The tokenizer produces the following output::"
msgstr "L'analyseur produit la sortie suivante ::"
2017-08-09 22:23:54 +00:00
#: library/re.rst:1817
2018-04-28 22:28:01 +00:00
msgid ""
"Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O'Reilly Media, "
"2009. The third edition of the book no longer covers Python at all, but the "
"first edition covered writing good regular expression patterns in great "
"detail."
msgstr ""
"*Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O'Reilly Media, "
"2009*. La troisième édition de ce livre ne couvre plus du tout Python, mais "
2018-04-28 22:28:01 +00:00
"la première version explique en détails comment écrire de bonnes expressions "
"rationnelles."
#~ msgid ""
#~ "Python offers two different primitive operations based on regular "
#~ "expressions: :func:`re.match` checks for a match only at the beginning of "
#~ "the string, while :func:`re.search` checks for a match anywhere in the "
#~ "string (this is what Perl does by default)."
#~ msgstr ""
#~ "Python offre deux opérations primitives basées sur les expressions "
#~ "rationnelles : :func:`re.match` cherche une correspondance uniquement au "
#~ "début de la chaîne, tandis que :func:`re.search` en recherche une "
#~ "n'importe où dans la chaîne (ce que fait Perl par défaut)."
#~ msgid ""
#~ "Return all non-overlapping matches of *pattern* in *string*, as a list of "
#~ "strings. The *string* is scanned left-to-right, and matches are returned "
#~ "in the order found. If one or more groups are present in the pattern, "
#~ "return a list of groups; this will be a list of tuples if the pattern has "
#~ "more than one group. Empty matches are included in the result."
#~ msgstr ""
#~ "Renvoie toutes les correspondances de *pattern* dans *string* qui ne se "
#~ "chevauchent pas, sous forme d'une liste de chaînes. La chaîne *string* "
#~ "est analysée de la gauche vers la droite, et les correspondances sont "
#~ "renvoyées dans l'ordre où elles sont trouvées. Si un groupe ou plus sont "
#~ "présents dans le motif, renvoie une liste de groupes ; il s'agira d'une "
#~ "liste de *n*-uplets si le motif a plus d'un groupe. Les correspondances "
#~ "vides sont incluses dans le résultat."