From: "Rodrigo B. de Oliveira" Date: 2003-09-28T04:49:55+09:00 Subject: Re: regexp needed to split letters from numbers Thanks! Really beautiful. Rodrigo ----- Original Message ----- From: "Joel VanderWerf" > ... > > String#[]=, as in "s1[pat] = s2", is a destructive slice operator. It > replaces the first match of pat with the r.h.s. (raising IndexError if > no match). > > In this case, pat is /(?=\d+ mg)/, which has a lookahead pattern > (?=...)... >