Posts

Showing posts with the label RegEx In Python

What is RegEx? Regular Expression in Python & Meta Characters

Image
What is RegEx? A  regular expression  ( regex ,  regexp, or re )  is a special sequence of characters that helps you match or find other strings or sets of strings, using a specialized syntax held in a pattern.  Regular expression  patterns are assembled into a set of byte codes which are then executed by a matching engine written in  C . Regular expressions are widely used in the world of  UNIX . Now let’s understand simple basic regular expression through the following image.   The  caret sign   (^)  serves two purposes. Here, in this figure, it’s checking for the string that doesn’t contain upper case, lower case, digits, underscore and space in the strings. In short, we can say that it is simply matching for special characters in the given string. If we use caret outside the square brackets, it will simply check for the starting of the string. An example of a " proper "  email-matching regex  (like the one in the ...