-
chevron_right
Unleash the power of Python regex
pubsub.slavino.sk / infoworldcom · Wednesday, 24 February, 2021 - 11:00 edit
Regular expressions, or “regex,” is a system for finding complex patterns in text. Most every major language has support for regular expressions, whether as an add-on library or as a native library function.
Python comes with regex support out of the box, as part of its standard library. Here, we’ll take a quick tour of the Python regular expression library and how to get the most out of it. For more details about regular expressions generally, see this introduction in the Python documentation.
[ Tune into Serdar Yegulalp’s Smart Python video tutorials to learn smart Python tricks in 5 minutes or less ]
Python regex basics
To start using regexes in Python, simply import the Python regex library,
re
, which is included as part of Python’s standard library.
To read this article in full, please click here