From: Phrogz Date: 2007-01-13T01:30:12+09:00 Subject: Re: DRY gsub... Phrogz wrote: > James Edward Gray II wrote: > > a = d.split(/(?:\r\n|[;, ])/) > > Way more elegant. Way to see beyond the step-by-step process to the end > goal. Except that there's no need for the non-capturing group, so (simplifying, not golfing): a = d.split( /\r\n|[;, ]/ ) Unless, of course, you have a string like this: d = "foo; bar\r\n\r\nwhee" and you only wanted [ "foo", "bar", "whee" ], in which case: a = d.split(/(?:\r\n|[;, ])+/) \Man, I'm the king of multiple posting today \\Fark slashies ftw! \\\Back to work