[rt-devel] Re: RT 3.0.1 I18N patch proposal

Remy Chibois rchibois at free.fr
Tue May 6 14:35:38 EDT 2003


Quoting Autrijus Tang <autrijus at autrijus.org>:

> On Tue, May 06, 2003 at 05:41:02PM +0200, Remy Chibois wrote:
> > In fact, after numerous tries, the first regexp in the function
> "transforms"
> > \n to \s (haven't yet figured out why). If you put some debug
> statments in
> > that area of RT, you'll see that $trailing is "\s\t" in case of a
> multiline
> > MIME words string and "\s" when at the end of that string. Thus, the
> "original"
> > regexp catches both cases, and only at the end of the string.
> 
> But in case of multiline strings, shouldn't it be
> 
> 	$trailing =~ s/\s?\t?$//mg;
> 
> instead of 
> 
> 	$trailing =~ s/\s?\t?$//g;
> 
> so "$" matches multiple end of lines?  Or did I miss something?

This regexp is executed for each line of a multiline string since
the very first regexp produces an array, thus it is not necessary to
specify 'm'. In fact it should also work without 'g', given that it
appears only once per line.

-- 
    Remy Chibois



More information about the Rt-devel mailing list