Regex Cheatsheet For Natural Language Processing tasks

This article was published as a part of the Data Science Blogathon

Introduction

Regex is a shorthand for Regular Expression. It is a representation for a set, a set of strings. Say we have a list of emails and we want to check if they are in the correct format or not. One way is to check each and every mail manually but that’s not possible if the number of mails is quite high. So, regex here comes to your rescue. Whenever you want to check emails are valid or not, you can simply match them against the pattern. You’ll get true or false results whether the mail is in the correct format or not according to the regex pattern used.

What are Regular Expressions use for?

Some popular and very common use cases are: