• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Replacing Returns

Community Expert ,
Nov 21, 2008 Nov 21, 2008

Copy link to clipboard

Copied

I have an input text field where I need to replace every return or tab entered.

I tried the GREP below thinking a global search for \n would get the returns. How would I replace returns?

var returns:RegExp = /\n/gi;
var str:String = vf.text;
str.replace(returns, " -- "));
TOPICS
ActionScript

Views

420

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2008 Nov 21, 2008

Copy link to clipboard

Copied

LATEST
I figured it out--it's \r not \n...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines