RegEx (Regulation Expressions)
This is a means of describing a set of strings using a subset of common characteristics. For example, the common characteristics of aaa, aba, and aca are that they all start and end with the letter a.
Regular expressions add a level of abstraction to strings that makes it easier to search and manipulate text. While they can seem very confusing at first, the syntax for regular expressions is pretty standard across different programming languages.
This is a good guide for common regex used in Ruby.
Could not solve this problem using RegEx in Ruby and could not find anyone else that did either so I’m frustrated, but I don’t feel too bad.
Solution without RegEx:
Talked to Thomas and he suggested removing the .com and just search of emails that have ‘@gmail’ so we can avoid dealing with the period. Pretty smart!
Solution with RegEx: