Skip to main content
wfzen
Inspiring
August 22, 2017
Answered

Replace double quotes with something else from user entry field

  • August 22, 2017
  • 1 reply
  • 808 views

I need to pass Flash data to Lectora. Lectora has problem with special characters (e.g. double quotes, single quotes, line break) from Flash.

How do I identify double quotes and change them to something else? I can't do """ with quote inside. It's not acceptable.

Thanks,

This topic has been closed for replies.
Correct answer kglad

you can use backslash to escape any character, or use single quotes to define double quotes and double quotes to define single quotes:

var s:String=yourtextfield.text.split('""').join('whatever');

hint: use the trace statement and a new project to experiment and see how strings/arrays work.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
September 1, 2017

you can use backslash to escape any character, or use single quotes to define double quotes and double quotes to define single quotes:

var s:String=yourtextfield.text.split('""').join('whatever');

hint: use the trace statement and a new project to experiment and see how strings/arrays work.