Regular expressions are patterns that help in filtering the text possessing them, and also in extracting portions of data that match the patterns, for further use.
- The patterns are built using special characters.
- Python uses
repackage to deal with regular expressions.
import re pattern='for' text='information' if re.search(pattern, text): print('Yes')