...

View Full Version : Replace spaces with a line feed



PauletteB
08-04-2002, 08:42 PM
What does one insert in the quotes to have a new line (or a return) replace any three or more occurrences of a white space? or is this even possible...

Everything I tried failed \r, \n, variables, etc...

xxx.replace(/\s{3,}/g, " ")

Thanxx

PauletteB
08-04-2002, 10:36 PM
I feel silly...

replace(/\s{3,}/g,"<br>")


Paulette



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum