[thelist] Regular Expression

Joshua Olson joshua at alphashop.net
Wed Apr 25 16:11:12 CDT 2001


In javascript, I was under the understanding the line breaks in strings are
basically equal to '\n'.  If you have the string 'This is line 1\nThis is
line 2' then the '\n' will be replaced by the operating systems cr/lf
combination.  So, the replacement, you may find, won't actually make the
string change... or am I misunderstanding the question?

Are you looking to replace multiple cr/lf's with a single '\n'?

-joshua

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> Subject: RE: [thelist] Regular Expression
>
>
> JScript or Javascript
>
> -----Original Message-----
> From: Joshua Olson [mailto:joshua at alphashop.net]
> -joshua
>
> > -----Original Message-----
> > From: thelist-admin at lists.evolt.org
> > Subject: [thelist] Regular Expression
> >
> > How do you detect line breaks and replace it with a "\n"? Thanks!
> >
> > - Johnny Lam





More information about the thelist mailing list