Category: 2. Python Regex

  • Python Regex Anchors

    Summary: in this tutorial, you’ll learn how to use regular expression anchors to match the character positions including the beginning and the end of a string. Introduction to the regex anchors Regular expressions provide you with two anchors that match the positions of characters: The following example uses the \d\d to match two digits in a time string:…

  • Python Regex Character Set

    Summary: in this tutorial, you learn about character sets in regular expressions including digits, words, whitespace, and the dot (.). Introduction to Python regex character sets A character set (or a character class) is a set of characters, for example, digits (from 0 to 9), alphabets (from a to z), and whitespace. A character set…

  • Python Regular Expressions

    Summary: in this tutorial, you’ll learn about Python regular expressions and how to use the most commonly used regular expression functions. Introduction to the Python regular expressions Regular expressions (called regex or regexp) specify search patterns. Typical examples of regular expressions are the patterns for matching email addresses, phone numbers, and credit card numbers. Regular…