Subj : Re: truncsp() for beginnings of strings?
To : Tracker1
From : Deuce
Date : Wed Nov 18 2009 09:29 am
Re: Re: truncsp() for beginnings of strings?
By: Tracker1 to art on Tue Nov 17 2009 10:19 pm
> return this.replace(/^[\s\r\n]+/g, '');
\s includes \r and \n. The g flag is useless since + is greedy by default and
the match is anchored to the start of the string (unless you want multilines,
which you don't).