Skip to content

Tag Archives: Python Regex-programs

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
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 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
Prerequisite: Regular Expression in Python Many of the times we need to search for a particular type of file from a list of different types… Read More
Prerequisite: Regular Expression in Python Given a string str, the task is to check if a string starts with a given substring or not using… Read More
Prerequisite: Regular Expression in Python In this article, we will see how to remove continuously repeating characters from the words of the given column of… Read More
Prerequisite: Regular Expression in Python In this article, we will see how to extract punctuation used in the specified column of the Dataframe using Regex.… Read More
Let us see how to extract IP addresses from a file using Python.  Algorithm :   Import the re module for regular expression. Open the file… Read More
Prerequisites: Regular Expression in Python Given a string. The task is to count the number of Uppercase, Lowercase, special character and numeric values present in… Read More
Given a password, we have to categorize it as a strong or weak one. There are some checks that need to be met to be… Read More
Regular Expression (regex) is meant for pulling out the required information from any text which is based on patterns. They are also widely used for… Read More