You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everyone knows grep. Its reputation precedes it. Maybe the most of us don't care for how it works, but we love it because, it just works.
With that said, the following is a deep-dive into Regular Expressions using Python. The aim of this issue is for us to better understand how grep works. Enjoy!
--
Discussion Points
Case Study: Street Addresses
Case Study: Roman Numerals
Using the {n,m} Syntax
Case Study: Parsing Phone Numbers
The text was updated successfully, but these errors were encountered:
A few questions to help our understanding of regular expressions as used in Python.
The most obvious regex application would be searching. What applications come to mind when you think of regex? (Hint: search for a piece of text, then [do something]).
The author speaks fondly of string helper functions i.e. find(), urging us to use them instead of regex, whenever possible.
a. Why does the author urge the use of string functions over regex?
b. When would it be considered proper to use regex of string functions?
For good measure and for the fun of it, using a language of your choice, can you employ regular expressions to Match Anything But A New Line? View challenge on HackerRank.
Write a regex that will match a string S using the condition, S should begin with py followed by 1 or 4 digits.
Uh oh!
There was an error while loading. Please reload this page.
Regular expression or regex - we use them but don't love them! 😬 😆
According to Wikipedia, regular expressions are:
If Wikipedia is not enough you, check out grep.
Everyone knows
grep
. Its reputation precedes it. Maybe the most of us don't care for how it works, but we love it because, it just works.With that said, the following is a deep-dive into Regular Expressions using Python. The aim of this issue is for us to better understand how
grep
works. Enjoy!--
Discussion Points
The text was updated successfully, but these errors were encountered: