0% found this document useful (0 votes)
5 views

Module 5 - Regular Expression

Uploaded by

shane.indian
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Module 5 - Regular Expression

Uploaded by

shane.indian
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 44

Module 5 – Regular

Expression

GOWRI PRASOOD USHA


SENSE
VIT CHENNAI
Regular Expression

 Matching,
 Search and replace,
 Patterns.
Regular Expression

 Regular expression attempts to find whether a specified


pattern exists within an input string and perform some
operations when it exists.
MetaCharacters

 Metacharacters are characters that are interpreted in a


special way by a RegEx engine. Here's a list of
metacharacters:

 [] . ^ $ * + ? {} () \ |
 ab* will match ‘a’, ‘ab’, or ‘a’ followed by any number of
‘b’s.
Special Sequences

 Special sequences make commonly used patterns easier to write. List of special
sequences:
Match object
https://www.w3schools.com/python/trypython.asp?
filename=demo_regex_sub2

You might also like