Thanks for the help I did get it working with this: name = row[0].match(/^([^@]+)/).to_s domain = row[0].match(/[^@]+$/).to_s though I'm not sure I fully understand what the [^@] does. I know that ^ is the start of the line and + means once or more, and I thought that [] was used to match any of several characters, but it looks like something else is going on here. Is this working just a fluke or is that the proper wat to do it? -----Original Message----- From: Jared Anderson Reply-to: Main PLUG discussion list To: Main PLUG discussion list Subject: Re: RegEx question Date: Thu, 17 Sep 2009 08:55:13 -0700 ^([^@]+)@ On Thu, Sep 17, 2009 at 8:25 AM, Paul Mooring wrote: This is probably a really obvious question but how can I match everything up to a character not including that character with regex? For example: person@email.tld => person me@here.com => me --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change your mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change your mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss