Posted By

dx0ne on 02/01/11


Tagged

as3


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

kure69


replacing line breaks in actionscript


 / Published in: ActionScript 3
 

URL: http://www.moock.org/blog/archives/000305.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");

Report this snippet  

You need to login to post a comment.