Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
scotth1
Visitor

Brightscript Escape Quotation Marks

How do I escape quotation marks in a string using Brightscript? In particular, I am wanting to do this in a regex. I've tried double quotes and backslashes, but neither seems to do the trick for me. I searched for "escape" in the docs that come with the SDK, but that doesn't yield any useful results.
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: Brightscript Escape Quotation Marks

You can't escape them. You have to concatenate with Chr(34).
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Casten
Newbie

Re: Brightscript Escape Quotation Marks

Two double quotes together escape to a single quote.
Example:

Brightscript Debugger> print "some quotes ""around here"" "
some quotes "around here"

Reference:  https://developer.roku.com/docs/references/brightscript/language/expressions-variables-types.md#stri...

 

0 Kudos