I am dealing with a dirty data source that has some key value pairs I have to extract. for example:
First Name = John Last Name = Smith Home Phone = 555-333-2345 Work Phone = Email = john.doe@email.com Zip From = 11772 Zip To = 11782 First Name = John First Name = John
To extract the First Name, I am using this regular expression:
/First Name = ([a-zA-Z]*)/
How do I prevent multiple matches in the case where the First Name is duplicated as shown above?
Here is a version of this on Rubular.