Quantcast
Channel: CAREER – Ivy Professional School | Official Blog
Viewing all articles
Browse latest Browse all 36

Step By Step Guide of Python Regular Expressions – Part 2

$
0
0

This article is in continuation of our first part of a Step by Step guide of Python Regular Expressions. The meta-characters, special sequences,  and sets are the essential parts of a regular expression. We are going to talk about working examples of these on the two-sample text data considered earlier. The movie review text is considered if someone is working on Topic Modelling. The Covit tweet sample is for NLP enthusiasts working on Sentiment Analysis. movie_review = """Troy is loosely based on Homer's 'Iliad', Wolfgang Petersen directs this epic war film, with an ensemble cast including Brad Pitt, Eric Bana, Orlando Bloom, Diane Kruger, Troy Sean Bean, Brian Cox, Rose Byrne, Garrett Hedlund, Peter O' Toole, Brendan Gleeson, & Tyler Mane.Troy is about love, power, deceit, valour, glory.""" covid_tweet = """As of today, the cumulative number of confirmed #COVID19 cases is 97 302,  total number of #COVID19INDIA deaths is 1930 and the total number of recoveries is 51 608.""" Special Sequence – A special sequence is a \ followed by one of the characters and has a special meaning. For example \w, \W, \d, \D Try to observe the information given in the snapshot provided above. Are you able to […]

The post Step By Step Guide of Python Regular Expressions – Part 2 appeared first on Ivy Professional School | Official Blog.


Viewing all articles
Browse latest Browse all 36

Latest Images

Trending Articles





Latest Images