1
голосов
3ответов
720 просмотров

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

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 i...

4
голосов
1ответов
365 просмотров

gVIM on Windows: execute buffer and paths with spaces

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 fro...

2
голосов
2ответов
2300 просмотров

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:"...

1
голосов
2ответов
1658 просмотров

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? ...

1
голосов
5ответов
1452 просмотров

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.

27
голосов
6ответов
53259 просмотров

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 th...

2
голосов
1ответов
1336 просмотров

Literal quotes in flags for a command in a bash script

I'm writing a Bash script in which I am running a perl script which requires flags that have double quotes in them. Running the script normally, you would run $ perl script.pl -flag="something" -anotherflag="somethingelse" In my script, I'm using variables in these flags, but would like to pre...

1
голосов
4ответов
842 просмотров

nested quotes in javascript

A bit of a noob question here... I have a javascript function on a list of table rows <tr onclick="ClosePopup('{ScenarioID}', '{Name}');" /> However, the {Name} value can sometimes contain the character "'" (single quote). At the moment the error Expected: ')' comes up as a result becau...

67
голосов
6ответов
27772 просмотров

How to remove extra indentation of Python triple quoted multi-line strings?

I have a python editor where the user is entering a script or code, which is then put into a main method behind the scenes, while also having every line indented. The problem is that if a user has a multi line string, the indentation made to the whole script affects the string, by inserting a tab...

3
голосов
2ответов
1888 просмотров

Quoting not respected inside a bash variable

I'm storing the arguments to a command in a variable. The final command I want is: mock -r myconfig --define "debug_package %{nil}" --resultdir results --rebuild mypackage.src.rpm Here's my attempt: set -x # for debugging RESULTDIR=results MOCK_CONFIG="myconfig" MOCK_ARGS="-r $MOCK_CONFIG...

2
голосов
3ответов
1422 просмотров

PHP Mysql Auto Quote?

When inserting a row in mysql database, string values need to be enclosed in quotes where integer don't need to. Is there any class or library that takes care of this automatically so that I can just pass to a 3rd-party function an array of fieldnames and values and don't have to worry about put...

16
голосов
2ответов
7539 просмотров

How to use quote " character in XAML binding?

I'm trying to do this: <TextBlock Text="{Binding Path=Text, Converter={StaticResource stringFormatConverter}, ConverterParameter='\"{0}\"'}" /> But this is apparently not the way to get a quote into a XAML binding string. What is the appropriate way to get "\"{...

1
голосов
5ответов
229 просмотров

Regular expression problems

I need some help with some regular expression problems I am having. First off, double quotes ". Anything between "" needs to be matched. Next problem I need to match anything that starts with a ' till the end of a line \n or <br />. I've tried all sorts, but nothing seems to match it. Any...

1
голосов
1ответов
169 просмотров

Regexes for quotations

I've already got help here for creating a quotation extraction function. Thanks alot, soulmerge! Now I'm looking for regular expressions (PHP) which extract the cited text and the cited person. The person should be in one index (substring), the text in another index (substring). For English tex...

8
голосов
2ответов
4597 просмотров

MySQL choking on curly (smart) quotes

I'm inserting some data into a database from a form. I'm using addslashes to escape the text (have also tried mysql_real_escape_string with the same result). Regular quotes are escaped, but some other quotes are not. For example, the string: Homer's blood becomes the secret ingredient in Moe...

6
голосов
3ответов
7000 просмотров

PHP: different quotes?

What is the difference between the quotes " and ' ? What about `? Is there an error in using different quotes ' and " below? $result = pg_query_params($dbconn, 'INSERT INTO users (username, email, passhash_md5) VALUES ($1, $2, $3)', array($username, $email, $passhas...

18
голосов
7ответов
39597 просмотров

fetch stock quotes from google finance, yahoo finance or the exchange itself

I am building a web based trading system where buy and sell signals would be generated by reading quotes from either Yahoo finance, google finance or the exchange(NSE of India) itself.My first preference would be to fetch data from this url: http://www.nseindia.com/content/equities/niftywatch....

0
голосов
1ответов
819 просмотров

character for single quote

(backtick) and ' are two different characters for single quote. I have a mysql script that shows the former two quote characters, if I change them to ', it breaks the syntax. how do I type ` from the keyboard?

6
голосов
3ответов
3681 просмотров

Escape Single Quote Characters when Importing to SQLite

I have a records.txt file like this: INSERT INTO 'blogtitles' VALUES('Kelly's at house'); INSERT INTO 'blogtitles' VALUES('Nice catch!'); When i try to import records.txt into the db: sqlite3 my.db

33
голосов
8ответов
16747 просмотров

PHP static variables in double quotes

How can I get PHP to evaluate a static variable in double quotes? I want to do something like this: log("self::$CLASS $METHOD entering"); I've tried all sorts of {} combos to get the variable value of self::$CLASS, but nothing has worked. I've currently settled with string concatenation but it ...

1
голосов
8ответов
2822 просмотров

What is the correct usage of (nested | double | simple) quotes

I'm sure this question may seem foolish to some of you, but I'm here to learn. Are these assumptions true for most of the languages ? EDIT : OK, let's assume I'm talking about Perl/Bash scripting. 'Single quotes' => No interpretation at all (e.g. '$' or any metacharacter will be considered...

3
голосов
1ответов
10947 просмотров

t-sql replacing double quotes

I have a t-sql statement like Replace(field,' because i have two different results ''field1'' and "field2" but what if i consider those two different results the same and want to group them. I choose to group those two by replacing the first double quotes with the second style but although repla...

0
голосов
1ответов
3639 просмотров

Importing comma separated data into Excel

1,1,"Pound","The foe is physically pounded with a long tail or a foreleg, etc.",0,40,0,100,35,0,0,0,115,0 2,2,"Karate Chop","The foe is attacked with a sharp chop. It has a high critical-hit ratio.",43,50,1,100,25,0,0,0,115,0 3,3,"DoubleSlap","The foe is slapped repeatedly, back and forth, two ...

9
голосов
4ответов
7696 просмотров

How to properly escape triple nested quotes in JSP tags

We just upgraded Tomcat and the newer Tomcat doesn't like nested quotes in the tag, so we have to alternate between single and double quotes. For example, We used to have, <form id="search" action="<fmt:message key="search.url"/>"> Now we can change it to, <form id="search" ac...

1
голосов
2ответов
582 просмотров

append removing quotes

This is a fairly simple problem but I can't find a solution. I write some xml to a hidden div on tha page and i read it later on. The problem is that some quotes are being removed when writing to the div and because of this I can't load the use the xml in IE using LoadXML this is the XML <pa...

2
голосов
3ответов
1115 просмотров

How can I properly escape JavaScript in JavaScript?

This might be something I can't do but... parent.document.getElementById('<?php echo $_GET['song']; ?>') .innerHTML = '<img src="heart.png" onmouseover="heartOver('');" >'; The onmouseover="heartOver(''); portion breaks my JavaScript. Is there a way to escape the quotes so I can ...

27
голосов
5ответов
6929 просмотров

Properly handling spaces and quotes in bash completion

What is the correct/best way of handling spaces and quotes in bash completion? Here’s a simple example. I have a command called words (e.g., a dictionary lookup program) that takes various words as arguments. The supported ‘words’ may actually contain spaces, and are defined in a file called wor...

0
голосов
1ответов
745 просмотров

Проблемы с символом цитаты сценария VB, очень нужна помощь!

У меня очень сложная проблема с контентом внутри текстового поля на классической странице ASP. Причиной возникновения проблемы является то, что конечный пользователь копирует и вставляет содержимое из Word в текстовое поле на странице. Затем эта страница отправляет содержимое формы по электро...

1
голосов
4ответов
2168 просмотров

Проблемы с одинарными кавычками при использовании функции поиска и замены C ++

Вот мой код для поиска последовательности в строке и замены ее другой: std::string find_and_replace( string &source, string find, string replace ) { size_t j; for ( ; (j = source.find( find )) != string::npos ; ) { source.replace( j, find.length(), replace ); } ...

1
голосов
3ответов
835 просмотров

Получить код вне кавычек с регулярным выражением в javascript

Есть ли способ получить фрагмент кода, который не находится в кавычках (одинарных или двойных) в javascript с помощью регулярных выражений? если у меня есть эта строка: 'this is a test "this shouldn't be taken"' результат должен быть: 'this is a test'