replacing line breaks in actionscript

/ Published in: ActionScript 3
Save to your folder(s)

Copy this code and paste it in your HTML
  1. var newText:String = oldText.replace(/
  2. /g, "\n");
  4. //and here's a snippet to replace all multiple line breaks with a single new line character:
  5. var newText:String = oldText.replace(/[
  6. ]+/g, "\n");


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.