I've got a problem with RegEx and Delphi 2k9 (Win32). I get the following Error:
First chance exception at $7C812AFB. Exception class Exception with message 'TPerlRegEx.Compile() - Please specify a regular expression in RegEx first'.
I've got the latest version of TPerlRegEx from the website. Using its defualt settings (Using DLL)
I...
I'm trying to come up with a regex to be able to parse the following type of strings into groups.
<link rel="alternate" type="application/rss+xml" title="[!PageTitle!]" href="[!SiteRoot!]/feed.xml" />
My regular expression is:
\[\!(.+)\!\]
The problem with this expression is that it seems to pull it all into 1 group:
Found 1 match...
I have downloaded some files from the internet related to a particular topic. Now I wish to check if the files have any duplicates. The issue is that the names of the files would be different, but the content may match.
Is there any way to implement some code, which will iterate through the multiple folders and inform which of the files...
I have a large body of text which has several sentences wrapped in yada
I'd like to find a way with JQUERY, to go through the entire body of text, and every time it find a span with class "findme", to take what ever copy is contianed between the tag and to append that to a UL as a LI
Ideas on how to do this efficiently?
THanks
...
hi,
in my application i want to validate the telephone numbers, how can i write regular expression for telephone numbers like..
040-23357399 or 04023357399
91-40-23357399 or 914023357399
08518-2814655 or 085182814655
91-8518-2814655 or 9185182814655
this is my phone numbers how can i write the expression for this
...
In php, I have used preg_match_all() to find keywords (using the format %keyword%) in a string, which works wonderfully and returns an array of all found keywords.
What I would like to do, is do the same thing using jQuery or javascript. I have tried using the filter() function, and it kind of works. But I think I am missing somethin...
Hi guys,
I'm reading a js file at here, on the very top of this js file you can find the following lines:
var
gsAgent=navigator.userAgent.toLowerCase(),
gsAppVer=navigator.appVersion.toLowerCase(),
gsAppName=navigator.appName.toLowerCase(),
gbIsOpera=gsAgent.indexOf("opera")>-1,
gbIsKHTML=gsAgent.indexOf("khtml")>-1
||gsAgent.indexOf(...
I've got multiple SVN repositories of different projects which I would like to search for the same search term / regex, but without checking out or updating each project and doing the search manually on each of them.
I'd like to know if it is possible to search the file contents in multiple SVN repositories for some search term (or rege...
I found this useful regex code here while looking to parse HTML tag attributes:
(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?
It works great, but it's missing one key element that I need. Some attributes are event triggers that have inline Javascript code in them like this:
onclick="doSomething(this, 'foo', 'bar');return false;...
Consider..
dict = {
'Спорт':'Досуг',
'russianA':'englishA'
}
s = 'Спорт russianA'
I'd like to replace all dict keys with their respective dict values in s.
...
I see questions every day asking how to parse or extract something from some HTML string and the first answer/comment is always "Don't use RegEx to parse HTML, lest you feel the wrath!" (that last part is sometimes omitted).
This is rather confusing for me, I always thought that in general, the best way to parse any complicated string i...
Hi,
I wrote a little search script for a client, it works and words get highlited, BUT...
Imagine this situation:
search term: test
found result: Hello this <a href="/news/this-is-a-test">is a test</a>
In this example both 'test' in the href part and between the <a> tags get highlited, breaking the link.
How could I prevent this?
...
I am writing a small windows script in javascript/jscript for finding a match for a regexp with a string that i got by manipulating a file.
I know the line number for starting and ending of the search. But I am stuck at this position for a while.
...
$w = 'self-powering';
%h = (self => 'self',
power => 'pauә',
);
if ($w =~ /(\w+)-(\w+)ing$/ && $1~~%h && $2~~%h && $h{$2}=~/ә$/) {
$p = $h{$1}.$h{$2}.'riŋ';
print "$w:"," [","$p","] ";
}
I expect the output to be
self-powering: selfpauәriŋ
But what I get is:
self-powering: [riŋ]
My guess is something's wro...
Suppose I have 500 rows of data, each with a paragraph of text (like this paragraph). That's it.I want to do a search that matches part of words. (%LIKE%, not FULL_TEXT)
What would be faster?
SELECT * FROM ...WHERE LIKE "%query%"; This would put load on the database server.
Select all. Then, go through each one and do .find >= 0 This ...
I have a string such as "big bad dog", how can I get an string[] array which includes all the possible word/phrase combinations?
So, I would like to return "big", "bad", "dog", "big bad", "bad dog" and "big bad dog" - therefore the order of the words in the original string must be respected.
Is this something that could be done with a ...
I am trying to split a string in Javascript using a Regular Expression. My code is as follows:
var status = "This is a test http://yfrog.com/5y6eruj";
var regexp = /(http:\/\/yfrog\.com(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;
matchParts = status.split(regexp);
alert(matchParts);
In Chrome and FF when I a...
Someone provided me the regex to parse out a query string: (?<=\?)[^?]+$
I am trying to use that in JMeter with no luck (although I am successful in pulling out individual query string parameter values based on various example postings on the web).
I created a regular expression extractor called "Grab QueryString".
I selected the URL ...
I have a table:
+--------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+------------------+------+-----+---------+----------------+
| idurl | int(11) | NO | PRI | NULL | auto_increment |
| idsite | int(10) unsigned | NO | MUL |...
I have the following text, I need to extract the exception name and the continuing sentence from the file, but the file has continuous sentences without a space.
??????>?????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????...