Skip to content

Tag Archives: python-regex

In this article, we will see how to extract all the valid emails in a text using python and regex.  A regular expression shortened as… Read More
Regex Lookbehind is used as an assertion in Python regular expressions(re) to determine success or failure whether the pattern is behind i.e to the right… Read More
A Regex (Regular Expression) is a sequence of characters used for defining a pattern. This pattern could be used for searching, replacing and other operations.… Read More
Regex or Regular Expressions are an important part of Python Programming or any other Programming Language. It is used for searching and even replacing the… Read More
Lookahead is used as an assertion in Python regular expressions to determine success or failure whether the pattern is ahead i.e to the right of… Read More
Given an IP address as input, the task is to write a Python program to check whether the given IP Address is Valid or not… Read More
Prerequisite: Python Regex Given an IP address as input, write a Python program to find the type of IP address i.e. either IPv4 or IPv6.… Read More
Text preprocessing is one of the most important tasks in Natural Language Processing. You may want to extract number from a string. Writing a manual… Read More
To count the number of overlapping sub strings in Python we can use the Re module. To get the indices we will use the re.finditer()… Read More
Metacharacters are considered as the building blocks of regular expressions. Regular expressions are patterns used to match character combinations in the strings. Metacharacter has special… Read More
Python offers some flags to modify the behavior of regular expression engines. Let’s discuss them below:  Case Insensitivity Dot Matching Newline Multiline Mode Verbose Mode… Read More
Given a String and HTML tag, extract all the strings between the specified tag. Input :  ‘<b>Gfg</b> is <b>Best</b>. I love <b>Reading CS</b> from it.’… Read More
In this article, we are going to see how to check whether the given string contains only certain set of characters in Python. These defined… Read More
Prerequisite: Regular Expression in Python URL or Uniform Resource Locator consists of many information parts, such as the domain name, path, port number etc. Any… Read More
Prerequisite: Regular Expressions in Python In this article, Let’s see how to extract date from the Excel file. Suppose our Excel file looks like below… Read More