I'm working with an instance method inside a class that needs to take in a string of emails and separate them at either a comma OR a space.
I keep getting one or the other to pass, but can't make it so that both the comma and space pass together. I'm trying with regex.
Thanks for your help!
def parse @emails.split(/,\s/) end
example of emails list string: email@example.com, firstname.lastname@example.org email@example.com