|
So I have a ruby script that parses HTML pages and saves the extracted string into a DB... but i'm getting weired charcters (usually question marks) instead of plain text...
Eg : ‘SOME TEXT’ instead of 'Some Text'
I've tried HTML entities and CGI:...
Started by Vic on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Ruby has is storing the Unicode escape sequences for quotation marks (instead of ASCII quotation ....
That the quotation marks in question are not the standard ASCII quotation marks but the Unicode ones .
|
|
Trying to split a line wherever "," appears (with the quotation marks), The problem is VB.NET uses " to start/end strings, so I tried using .Split(""",""") but that then splits it by " not ","
Started by Hintswen on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
To escape the "-character....
I hope this helps.
Try something like this:
Dim TestToSplit As String = "Foo"",""Bar" Dim Splitted() As String = TestToSplit.Split(New String() {""","""}, StringSplitOptions.None)
I just tested it and got an array with Foo And Bar .
|
|
I have a value like this "Foo Bar" "Another Value" something else
What RegEx expression will return the values enclosed in the quotation marks (e.g. Foo Bar and Another Value)?
Started by deadbug on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Then, you use a language-specific mechanism to extract....
In general, the following regular expression fragment is what you are looking for:
"(.*?)"
This uses the non-greedy *? operator to capture everything up to but not including the next double quote .
|
Ask your Facebook Friends
|
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...
Started by James Wanchai on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
\' Single quotation mark \" Double quotation mark \\ Backslash \b Backspace \f.
Other characters.
|
|
On my site, an encoded quote (%22) in url path causes "Illegal characters in path" error I want specify search URLs like so:
www.site.com/search/%22Vitamin+C%22
%22 is an encoded quotation mark "
I'm using a Asp.Net URL Routing and the route is specified...
Started by Atomiton on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you have structured searches (a limited list of categories with names that conform to valid URL requirements or search by zip codes) then you could use the URL... .
For free-form search terms, you should use a QueryString parameter instead of a URL chunk .
|
|
Hi, I want to match the first number/word/string in quotation marks/list in the input with Regex. For example, it should match those:
"hello world" gdfigjfoj sogjds
-14.5 fdhdfdfi dfjgdlf
test14 hfghdf hjgfjd
(a (c b 7)) (3 4) "hi"
Any ideas to a regex...
Started by Alon on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
That cannot be done in regex - nothing that involves counting (except for non-standard lookaheads... .
[Edit] I missed that you wanted to count parentheses.
Any ideas to a regex or how can I start?
You can start with any tutorial on basic regex, such as this .
|
|
In my XAML file I want to display this text which contains double and single quotation marks:
You shouldn't choose "Copy if New".
None of these work:
<TextBlock Text="You shouldn't choose "Copy if New":"/> <TextBlock Text="You shouldn't choose...
Started by Edward Tanguay on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You should encode the special characters:
<TextBlock Text='You shouldn't choose "Copy if New":'/>
There are defined XML escapes " for " and ' for ' -- if the XML handling in XAML doesn't interpret those properly, then start... .
|
|
I thought that the quotation mark (") was simply a type of grouping marker but I'm debugging some NHibernate code and notice that while
SELECT * FROM site WHERE site_id = 3;
Works fine
SELECT * FROM "site" WHERE site_id = 3;
fails with a table or view...
Started by George Mauer on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Other_table"
will work
It should be added that identifiers in quotation marks may contain specialYou can use quote marks to delimit a table alias or a column alias, but your example is just simply.
|
|
Assume I have the following string:
<script language="javascript"> var league = new Array( "Soccer","Germany - 2. Bundesliga","38542195","102","24 May 2009 14:00","24 May 2009 14:00","1X2","1","0" ); var matches = new Array( "125","1.FC Nurnberg...
Answer Snippets (Read the full thread at stackoverflow):
I think you need to remove the " at the beginning and the end and split by ","
string [] test=Regex.Split(s.SubString(1,s.length-2), "\",\"");
Try the following:
using System.Text.RegularExpressions; public static MatchCollection getMatches(String input... .
|
|
I need to find a certain chunk from a group of HTML files and delete it from them all. The files are really hacked up HTML, so instead of parsing it with HtmlAgility pack as I was trying before, I would like to use a simple regex.
the section of html ...
Started by Alex Baranosky on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
How much of that text is needed to uniquely identify the target? I would try this first:
@"(?is)<center>\s*This\s+page\s+has\s+been\s+visited.*?</center>"
It really depends on how simple you can make the regex and match the desired elements... .
|