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 <[email protected]> Reply-to: Main PLUG discussion list <[email protected]> To: Main PLUG discussion list <[email protected]> Subject: Re: RegEx question Date: Thu, 17 Sep 2009 08:55:13 -0700 ^([...@]+)@ On Thu, Sep 17, 2009 at 8:25 AM, Paul Mooring <[email protected]> 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: [email protected] => person [email protected] => me --------------------------------------------------- PLUG-discuss mailing list - [email protected] To subscribe, unsubscribe, or to change your mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss --------------------------------------------------- PLUG-discuss mailing list - [email protected] To subscribe, unsubscribe, or to change your mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
--------------------------------------------------- PLUG-discuss mailing list - [email protected] To subscribe, unsubscribe, or to change your mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
