Python Regular Expression Programs

In Python, a Regular Expression (RegEx) is a sequence of characters that defines a search pattern. In Python, we need to use a module re to work with regular expressions.

This section contains various Python programs on Regular Expressions. Practice these Python Regular Expressions programs to learn the concept of pattern searching, these programs contain the solved code, outputs, and the detailed explanation of the statements, functions.

List of Python Regular Expression Programs

  1. Python Regex | program to Remove leading zeros from an IP address
  2. Python program to understand difference between match() and search() methods
  3. Python program to check the presence of substring in given string - Regex Example
  4. Python program to check whether a regular expression is present in string or not
  5. Python program to extract phone number from string using sub() method
  6. Python program to search for regular expression in string using search() method

Comments and Discussions

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© some rights reserved.