Monday, 26 December 2016

What is Regex in Python?

Regex(Regular Expression) specifies a set of string that can be matched
There is module in Python "re" (Regular expression) which is to be imported.
                                           "import re"

1.Regular Expressions can be concatenated to from another regular expression.
2.It can consist of both special and ordinary characters.
3.Both pattern and strings can be searched and they can be unicode or 8 bit strings.
   but a mixture of unicode and 8 bit strings is not supported both while searching and replacement.