quotation-marks

echo nested quotation marks in tcsh

I have a tcsh script that generates a text file. One of the lines in the text file is: bla bla bla 'foo foo foo "bar bar bar"': etc etc; Note the nested ' and " and also the : and ; that must be there. The : and ; require the whole string to be surrounded by quotation marks. However, if I do that, I have trouble escaping the quotat...

replace symbol in javascript

Does anyone know how can I replace this 2 symbol below from the string into code? ' left single quotation mark into ‘ ' right single quotation mark into ’ " left double quotation mark into “ " right double quotation mark into ” ...

Replacing quotation marks in Javascript?

For a web app I'm making, I'm going to be getting text strings coming in, occasionally which contain quotation marks. Because I am then going to be document.writing the string, they need to be changed either into apostrophes or escaped. How would I do that, because when I try it doesn't seem to work, specifically I think because the st...

Rails: Is it not possible/necessary to html_escape all email text (in the view)?

Hi there, can anyone tell me if it is normal and OK for Rails to turn a normal quotation mark (") into & q u o t ; (and not keep the normal quotation mark) when it is html_escape-d in an email view? I.e.: h(whatever_text_that_contains_normal_quotation_marks) in an email view "signup_mail.erb". Because that would mean that email conte...

Split/tokenize/scan a string being aware of quotation marks

Is there a default/easy way in Java for split strings, but taking care of quotation marks or other symbols? For example, given this text: There's "a man" that live next door 'in my neighborhood', "and he gets me down..." Obtain: There's a man that live next door in my neighborhood and he gets me down ...

Removing whitespace-characters, except inside quotation marks in PHP?

Hey I couldn't find any similar question, so I start a new one. I need to remove all whitespace from string, but quotations should stay as they were. I'm building a personal kind of minifier. Here's an example: string to parse: hola hola "pepsi cola" yay output: holahola"pepsi cola"yay Any idea? I'm sure this can be done with rege...