Questions tagged [double-quotes]

Questions related to the use of double-quotes in different programming languages.

1212 questions
-1
votes
6 answers

Quotes in a php var

I am quite new in php. I have to store a img tag in a var. I think this is ok: $fotoTag1 = "text alt"; But the problem comes if there is a single quote in the name of the photo or in the alt?. For intance, don't What I have…
segon
  • 273
  • 1
  • 4
  • 16
-1
votes
2 answers

R: How to read in numbers with comma as a Dec separator & a Field separator? "The two arguments to fread 'dec' and 'sep' are equal (',')."

This is partially related to reading in files in so-called European way, more in How to read in numbers with a comma as decimal separator?. I have data with a row such as…
hhh
  • 50,788
  • 62
  • 179
  • 282
-1
votes
2 answers

How to surround a string in double quotes

I have a file with the following firsttext=cat secondtext=dog thirdtext=mouse and I want it to return this string: "firsttext=cat" "secondtext=dog" "thirdtext=mouse" I yave tried this one-liner but it gives me an error. cat oneline | perl -ne…
alig227
  • 327
  • 1
  • 6
  • 17
-1
votes
2 answers

Sublime Text: Find all quotes(") inside double quotes using regex

I have a huge XML document I want to replace double quotes (") with its html entity " inside double quotes, I think it can be done using regular expressions in Sublime Text but I don't know what can be the regular expression for that! XML…
Muhammad
  • 6,725
  • 5
  • 47
  • 54
-1
votes
4 answers

Mysql INSERT query of variables in PHP

I have spent two days trying to figure out why this statement wouldn't insert those data into my database. Been reading through all similar questions here as well and tried with no luck. This is the statement: $sql = "INSERT INTO…
Hang
  • 355
  • 3
  • 19
-1
votes
2 answers

double quotas appearing after json output in PHP array to JSON

I have read a question answer at PHP Array to json, how to get rid of some double quotes? I have same issue but my code is little different so I unable to ride of rid of some double quotes. My code : $features = array(); $geojson = array( …
Kuntal Parbat
  • 159
  • 1
  • 2
  • 12
-1
votes
2 answers

Escaping Quotes does not work in JavaScript innerHTML

I have got a quite bad "quoting situation" at the moment. I am working inside an innerHTML and inside this i want to call a function on the onClick-Event, which leaves me with the following: modalEl.innerHTML = '
'+ 'Gruppe…
Fynn
  • 210
  • 1
  • 6
  • 28
-1
votes
1 answer

Adding quotes to a particular word in string

I have a string that has a value that I want to be in quotes. Following is the text which I currently have: text = "#{value1} has viewed your #{value2}" I want value2 to be in quotes. I want: text = ""#{value1} has viewed your "#{value2}"" How can…
Charles Skariah
  • 670
  • 6
  • 18
-1
votes
3 answers

Ruby eval string with functions

I am trying to eval the expression: eval "\"1 pages\".gsub(/\D/,'')" It always retrieves '1 pages' while I expect only the string '1'. Why does eval ignore gsub?
Samur Araújo
  • 29
  • 1
  • 4
-1
votes
1 answer

Why do double quotes break the ssh statement?

I am trying to ssh into my amazon server. I have two ways of doing it, one works and one doesn't, and I'm not sure why the second one does not work. First way: ssh -i path-to-pem-file username@public-ip This works. Second way: ssh -i…
makansij
  • 9,303
  • 37
  • 105
  • 183
-1
votes
1 answer

Perl String replacement issue

I have a string as shown below, $str = 'dev-phase-to-improve == "NOTEQUAL"' I want to replace: dev-phase-to-improve == "NOTEQUAL" to !dev-phase-to-improve="" wondering how can i do that my code is some thing like as shown below, $rc_link =~…
Ammad
  • 4,031
  • 12
  • 39
  • 62
-1
votes
2 answers

Swift UItextfield text with quotation marks from user to a string variable with proper escape formating

In Xcode with swift, how can I save text with quotation marks in it from a UItextfield into a string variable. I know how to use escape in a string "\"", but can't find a way to replace it from user input text field? I am experimenting with…
-1
votes
2 answers

How to enable loose type search in MongoDB

I inserted a document in MongoDB like: db.test.insert({date:20150101}); When I tried to use db.test.find({date:"20150101"}) to search it (date string with double quote), no results were returned. Only when I use db.test.find({date:20150101}), it…
Kuan
  • 11,149
  • 23
  • 93
  • 201
-1
votes
3 answers

Fix improper quotes in text

I receive text from some writers that has a string like: string "string "string. I want it to read string "string" string. I've tried various sed tricks but none work. Here is one failed attempt: sed 's/.* "/.*"/g'
-1
votes
1 answer

Remove Double Quotes on Single JSON

I'm working with HighCharts and having a little trouble getting the color variable to work so it alternates colors. Here is my returned JSON array: [{"y":5,"color":"colors[0]","drilldown":{"name":"June","categories":["Fictional Hospice","Virtue…
user2436953
  • 45
  • 3
  • 9