quotes

how to get data between quotes in java ?

I have this lines of text the number of quotes could change like: Here just one "comillas" But I also could have more "mas" values in "comillas" and that "is" the "trick" I was thinking in a method that return "a" list of "words" that "are" between "comillas" how I obtain the data between the quotes the result should be?: www.eg....

Regex line by line: How to match triple quotes but not double quotes

I need to check to see if a string of many words / letters / etc, contains only 1 set of triple double-quotes (i.e. """), but can also contain single double-quotes (") and double double-quotes (""), using a regex. Haven't had much success thus far. ...

Most readable way to assign a double quote to a string in C#

Does anyone else think that escaping characters in very short strings make them not very readable? I noticed I was using s = "\"" in my code to assign a double quote a string, but having thought about it, I came up with the following alternative: s = '"'.ToString(). Is my alternative any good? Would you prefer see the first version in ...

PHP: POST data + apostrophes

Imagine this: Form data contains an apostrophe Form gets submitted POST data gets serialized POST data is written to database Database data is retrieved Data cannot be unserialized The problem is found in the serialized data. I tried without and with an apostrophe: s:7:"company";s:12:"Joes company" s:7:"company"...

gVIM on Windows: execute buffer and paths with spaces

Hello. In gVim for windows it's possible to execute current buffer via :!% command. But, unfortunately, the buffer file name is supplied to cmd.exe without quotes, so if file path has spaces gVim will not be able to execute it. Is it any easy way to fix it in order to be able execute .bat, .py etc from within gVim? ...

Simple regex - replace quote information in forum topic in C#

Hi! This should be pretty straightforward I would think. I have this string: [quote=Joe Johnson|1]Hi![/quote] Which should be replaced with something like <div class="quote">Hi!<div><a href="users/details/1">JoeJohnson</a></div></div> I'm pretty shure this is not going very well. So far I have this: Regex regexQuote = new Regex(...

jQuery double quotes

hi there, i have this form: <form name="myForm" action="#"> <input type="text" name="firstField" /> <input type="text" name="secondField" /> <input type="submit" name="submitButton" /> </form> and i have an ajax request: $('input[type="submit"]').click(function(){ var serialized = $('form').serialize(); /...

Need help modifying javascript snippet

Google optimizer includes the following snippet as part of their conversion code. Unfortunately, the CMS we're using automatically converts the single quotes to ASCII (& #39;). I'm a novice with JS, but my understanding is that single quotes and double quotes are basically interchangeable. However, it's not a straight swap as there are...

something confusing about define-key (and the issue of when to quote an argument)

It seems one is not supposed to quote KEYMAP when using define-key. (define-key org-remember-mode-map "\C-c\C-r" 'org-remember-kill) I'm confused because I think that all arguments of a function that is not quoted are evaluated, and according to the help, define-key is a function, not a macro. I don't see why the value of KEYMAP can b...

how to open a URL with non utf-8 arguments

Hello, Using Python I need to transfer non utf-8 encoded data (specifically shift-jis) to a URL via the query string. How should I transfer the data? Quote it? Encode in utf-8? Thanks ...

Forwarding command line arguments to a process in Python

I'm using a crude IDE (Microchip MPLAB) with C30 toolchain on Windows XP. The C compiler has a very noisy output that I'm unable to control, and it's very hard to spot actual warnings and errors in output window. I want to write a python script that would receive arguments for compiler, call the compiler with same arguments, filter resu...

google finance tools on my website?

i am on the process of building a website execlusively for trading purposes. including live quotes and level 2 quotes. charts. user protofollio with automatic updates. news and so on. am i allowed to use google finance tools on my website? and if yes how can i go about doing so? thanks in advance ...

How to run exe in powershell with parameters with spaces and quotes

How do you run this command in powershell: C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe -verb:sync -source:dbfullsql="Data Source=mysource;Integrated Security=false;User ID=sa;Pwd=sapass!;Database=mydb;" -dest:dbfullsql="Data Source=.\mydestsource;Integrated Security=false;User ID=sa;Pwd=sapass!;Database=mydb;",computername=10...

Automatic quoting MySQL queries doubts in Zend Framework

I've got few doubts regarding quoting mysql queries in Zend framework. Though this question has helped me a bit but few things are still confusing: 1) $table is Zend_Db_Table. Trying to fetch a row from the table. $where[] = $db->quoteInto('id = ?', $id); $where[] = $db->quoteInto('user_id = ?', $user_id); $row = $table->fetchRow($wher...

Why bother using mysql_real_escape_string() since $_POST addes slashes before a quote automatically?

In PHP, $_POST add slashes before a quotation mark automatically, so why bother applying mysql_real_escape_string()? For example, when I input 'rrr in an input field, and I get \'rrr when I echo it. ...

PHP-generated javascript and quote marks

I'm generating some javascript in my PHP code, and I need to assign some php variables to javascript variables. Unfortunately, sometimes my PHP variables contain quote marks. for instance: $foo = "'Dis here be a \"string\""; print "<script type='text/javascript'>var foo = '{$foo}';</script>"; will generate a javascript error because t...

IE doesn't support Q tag but you can style it.

I am puzzled with the statement that IE does not support <q> tag but it renders just fine on IE as an inline element so if it doesn't support it, so what? We can just style it with CSS to italicize and it works as expected. I tested from IE5 and up. http://www.w3schools.com/tags/tag%5Fq.asp Explain why it says it doesn't support it wh...

Write CSV To File Without Enclosures In PHP

Is there a native function or solid class/library for writing an array as a line in a CSV file without enclosures? fputcsv will default to " if nothing is passed in for the enclosure param. Google is failing me (returning results for a whole bunch of pages about fputcsv), and PEAR's libraries do more or less the same things as fputcsv. ...

Escape backquote in a double-quoted string in shell

For the command: /usr/bin/sh -c "ls 1`" (a backquote after 1). How to make it run successfully? Adding a backslash before "`" does not work. ` is a special char as we know, and I tried surrounding it with single quote too (/usr/bin/sh -c "ls 1'`'"), but that doesn't work either. The error always are: % /usr/bin/sh -c "ls 1\`" Unmatc...

regex expression for escaped quoted string won't work in php's preg_match_all

I am trying to match quoted strings within a piece of text and allowing for escaped quotes within it as well. I tried this regular expression in an online tester, and it works perfectly. However, when I try it in preg_match_all, it fails at the first escaped string. Here is the code: $parStr = 'title="My Little Website" year="2007"...