In this project, we will learn about regular expressions. Regular expressions are patterns used to match character combinations in strings. We will use ruby to work with regular expressions.
-
Regular Expression - Find a regular expression that will match the following:
School
-
Repetition Token #0 - Find a regular expression that will match the following:
hbttn
orhbtttn
orhbttttn
orhbtttttn
-
Repetition Token #1 - Find a regular expression that will match the following:
htn
orhbtn
-
Repetition Token #2 - Find a regular expression that will match the following:
hbtn
orhbttn
orhbtttn
orhbttttn
orhbtttttn
... -
Repetition Token #3 - Find a regular expression that will match the following:
hbn
orhbtn
orhbttn
orhbtttn
orhbttttn
... -
Not quite HBTN yet - Find a regular expression that always starts with
h
ends withn
and can have any single character in between. -
Call me maybe - Find a regular expression that will match a 10 digit phone number.
-
OMG WHY ARE YOU SHOUTING? - Find a regular expression that will match only capital letters.
-
Textme - Extract the sender, the receiver, the flags, and the message :
[SENDER: RECEIVER] Message (flags)
from a log file.