If the text comes in from a file or from a display dialog, AppleScript adds the escape characters. Try this, entering quoted text in the dialog, and look in the result window:
set theText to "text returned"
display dialog "Text Editor" default answer ""
If you know the ASCII value for the character you can concatenate it into a string using the “ASCII character” command or equate a variable to the ASCII character value and concatenate the variable into the string.
This is a Text-Edit Plus script I use for stripping tags and extraneous characters from HTML files:
tell window 1 of application "Tex-Edit Plus"
replace looking for ASCII character 10 replacing with ASCII character 13
replace looking for "<^*>" replacing with ""
replace looking for " " & return replacing with return
repeat until result is 0
replace looking for " " & return replacing with return
end repeat
replace looking for return & " " replacing with return
repeat until result is 0
replace looking for return & " " replacing with return
end repeat
replace looking for return & return & return replacing with return & return
repeat until result is 0
replace looking for return & return & return replacing with return & return
end repeat
end tell
You mean the double-quote character (")?
To include a double quote character in a string, you have to escape it by preceding it with a backslash (). For example:
set x to "Joe says "Hello!" to Frank."
Similarly, if you wish to include a backslash in a string, you must escape it the same way: “”.
HTH
has
If you type a string in Script Editor, you need to type those escapes yourself (not a big deal). The Smile editor has a convenient “Make an AppleScript string” menu option that’ll turn plain text into an AS string for you. None of this is an issue when reading text from file, say; only when you’re typing strings in the code itself.
has
Did you want to remove them from some text, and then save the no-links text, or did you want to get a list of the links from a web page and save them?
I believe Apple has a demo script that will yank out a specific tag from a text file, including the option to remove the text surrounded by a tag.