What does (?P<name>) pattern syntax do?

Ben Finney ben+python at benfinney.id.au
Tue Nov 11 00:19:56 CET 2014


satishmlmlml at gmail.com writes:

> What does ?P and <part1> match in the following piece of code?

Learn about Python's regular expression features from the documentation
<URL:https://docs.python.org/3/library/re.html>.

Experiment with regular expressions using online tools such as
<URL:https://pythex.org/>.

-- 
 \       “From the moment I picked your book up until I laid it down I |
  `\        was convulsed with laughter. Someday I intend reading it.” |
_o__)                                                    —Groucho Marx |
Ben Finney




More information about the Python-list mailing list