NEW
Font size
WorksheetsPython RegEx
Total questions: 7
Worksheet time: 4mins
We import this module to work with regular expressions.
re
ReEx
RegEx
Reg
The meaning of the meta character * is
One or more occurrences
Occurrences only for Numbers
Zero or more occurrences
Occurrences only for strings
Which is not a meta character
*
%
/
\
functions that belongs to regular expression module
findall
match
search
All the above
"\S" returns a
Match where the string DOES NOT contain a white space character
Match where the string CONTAINS a white space character
Match where the string DOES NOT contain any word characters
Match where the string DOES NOT contain digits
[^pqr] returns a
Match for characters p, q, r, P, Q and R only
Match for characters p, q, and r only
Match for any character contain p, q, and r
Match for any character except p, q, and r
Which returns a match for any alphabetic lower or upper case character between a and z.
[a-z]
[a-z-A-Z]
[a-z][A-Z]
[azAZ]
