How can I get the username without the @ symbol? That's everything between @ and any non-word character.
message = <<-MESSAGE
From @victor with love,
To @andrea,
and CC goes to @ghost
MESSAGE
Using a Ruby regular expression, I tried
username_pattern = /@\w+/
I will like to get the following output
message.scan(username_pattern)
#=> ["victor", "andrea", "ghost"]