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");
  3.  
  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");

URL: http://www.moock.org/blog/archives/000305.html

Report this snippet


Comments


You need to login to view comments.