|
I need to programatically replace " regular double quotes " with “ typographer's quotes ”
My initial thought is something like this:
<xsl:variable name="text"> <xsl:call-template name="replace-string"><!-- FYI: replace-string is a custom...
Started by joe on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
While there are issues....
The $1 is a back-reference to the first match.
Regex:replace($textVariable, '"([^"]*)"' , 'gi', '“$1”')
Havent " and replace that with your other typographical quotes.
Regular Expressions.
|
|
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.
Started by JF on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
\"{3} ["]{3} [\"]{3} I've quickly checked using http look for multiple occurrences of triple ... .
Depends on your language, but you should only need to match for three double quotes (e.g., /\"{3 operator to match exactly three double-quotes.
|
|
Do you know if using double quotes instead of single quotes in ruby decreases performance in any meaningful way in ruby 1.8 and 1.9.
so if I type
question = 'my question'
is it faster than
question = "my question"
I imagine that ruby tries to figure out...
Started by dimus on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
This makes it easier to actually add.
I suggest you use double quotes everywhere.
It will be exactly the same.
|
Ask your Facebook Friends
|
I have an application which uses a javascript based rules engine. I need a way to convert regular straight quotes into curl (or smart) quotes. It'd be easy to just do a string.replace for ["], only this will only insert one case of the curly quote.
The...
Started by BlueVoid on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Str = str.replace(/\b"/g, "”"); // Replace any quotes after a word // boundary with right curly quotes
(I've left the original.
, "”"); // Replace the rest with right curly quotes // or...
|
|
Hello all,
I have a text file (its comma delimited with some fields wrapped around in double quotes) when I parse through it using this:
if (($handle = fopen('C:\tester\fake.txt', "r")) !== FALSE) { while (($data = fgetcsv($handle, ",")) !== FALSE) { ...
Started by Abs on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It does....
With fputcsv you can write a cvs-file.
Fgetcsv does remove the quotes.
The quotes are part of the CSV file format (quotes around fields that contains , or newlines), therefore fgetcvs will (and is expected to) remove them.
|
|
I have a file that contains "straight" (normal, ASCII) quotes, and I'm trying to convert them to real quotation mark glyphs (“curly” quotes, U+2018 to U+201D). Since the transformation from two different quote characters into a single one has been lossy...
Started by ShreevatsaR on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
(Just to make sure it hasn't made....
The program should ask you first for all the quotes that it can definitely assign to a function.
Closing quotes.
Opening quotes are always at the opening of a line or have a space in front of them.
|
|
As you know when Magic Quotes are ON, single quotes are escaped in values and also in keys. Most solutions to remove Magic Quotes at runtime only unescape values, not keys. I'm seeking a solution that will unescape keys and values...
I found out on PHP...
Started by AlexV on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I think this is a little cleaner and avoids reference bugs:
function unMagicQuotify($ar) { $fixed = array(); foreach ($ar as $key=>$val) { if (is_array($val)) { $fixed[stripslashes... .
Array_walk_recursive($_POST, 'stripslashes');
Do the same for GET and COOKIE.
|
|
In JavaScript, it doesn't seem to matter whether you use single quotes or double quotes when writing strings. However, some programming languages treat them differently.
Is one more reliable than the other across multiple programming languages? Are there...
Started by Steve Harrison on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
In....
The meaning of quotes are very language dependant from the regular ' and " quotes.
Generally I use double quotes also in Javascript, because in the majority of the languages, but not in the other languages mentioned above.
|
|
I realized that I can have problems with single quotes in php arrays:
<?php $lang = array( 'tagline' => 'Let's start your project', "h1" => "About Me" ); ?>
So I changed it to double quotes:
<?php $lang = array( "tagline" => "Let's start...
Started by janoChen on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For me, that's using whichever quotes for the string that appear.
With single-quoted strings, you have simple-quotes to escape the double-quote special features.
Characters like \n , \t , ...
|
|
What is the difference between single quotes and double quotes in SQL?
Started by Vineet on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You....
That's the primary use anyways.
Stick to using single quotes.
Double quotes generally aren't used in SQL, but that can vary from database to database.
Single quotes are used to indicate the beginning and end of a string in SQL.
|