In this project, I learned how to use regular expressions. I practiced building them using Ruby's Oniguruma library.
Note: Each Ruby script in the project matches regular expressions based on an argument passed to it via the command line.
-
0. Simply matching School
- 0-simply_match_scool.rb: Ruby script that
matches the regular expression
Holberton
.
- 0-simply_match_scool.rb: Ruby script that
matches the regular expression
-
1. Repetition Token #0
- 1-repetition_token_0.rb: Ruby script that matches
the regular expression
hbn
with between 2-5t
's in betweenhb
andn
.
- 1-repetition_token_0.rb: Ruby script that matches
the regular expression
-
2. Repetition Token #1
- 2-repetition_token_1.rb: Ruby script that matches
the regular expression
hn
with 0 or 1 occurrences ofb
and 0 or 1 occurrences oft
in betweenh
andn
.
- 2-repetition_token_1.rb: Ruby script that matches
the regular expression
-
3. Repetition Token #2
- 3-repetition_token_2.rb: Ruby script that matches
the regular expression
hbn
with 1 or moret
's in betweenhb
andn
.
- 3-repetition_token_2.rb: Ruby script that matches
the regular expression
-
4. Repetition Token #3
- 4-repetition_token_3.rb: Ruby script that matches the
regular expression
hbn
with 0 or moret
's in betweenhb
andn
.
- 4-repetition_token_3.rb: Ruby script that matches the
regular expression
-
5. Not quite HBTN yet
- 5-beginning_and_end.rb: Ruby script that matches a
regular expression starting with
h
and ending withn
with any single character in between.
- 5-beginning_and_end.rb: Ruby script that matches a
regular expression starting with
-
6. Call me maybe
- 6-phone_number.rb: Ruby script that matches a regular expression representing a 10-digit phone number.
-
7. OMG WHY ARE YOU SHOUTING?
- 7-OMG_WHY_ARE_YOU_SHOUTING.rb: Ruby script that matches regular expressions of uppercase letters.
-
8. Textme
- 100-textme.rb: Ruby script that runs statistics on TextMe app text message transcations.
- Output:
[SENDER],[RECEIVER],[FLAGS]
where[SENDER]
is the sender phone number or name (including country code if present).[RECEIVER]
is the receiver phone number or name (including country code if present).[FLAGS]
is the flags that were used.
-
9. Pass LinkedIn technical interview level0
- 101-passed_linkedin_regex_challenge.jpg: Screenshot signifying completion of the LinkedIn Engineering Regex Puzzle.