Hello,
I am using regular expressions to validate user input. The following code collects a matches accessible with theMatch.Groups["identifier"]. How can i get a list of sub-strings that did not match in each group?
#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExp...
Using JavaScript RegEx.
How can I match a <p> element(including attributes), but not <param> or other HTML elements starting with a "P".
...
I need to do a "find and replace" on about 45k lines of a CSV file and then put this into a database.
I figured I should be able to do this with PHP and preg_replace but can't seem to figure out the expression...
The lines consist of one field and are all in the following format:
"./1/024/9780310320241/SPSTANDARD.9780310320241.jpg" or...
I want to parse an HTML document and extract a certain div block that can be repeated.
I've managed to extract THE FIRST occurrence of the block, but I cant figure out how to get the next.
This is my code so far:
String inputStr = HTTPGetter.get("http://someurl");
String patternStr ="<div class=\"MY-CLASS\">(.*?)</div>";...
Hello,
Let say that i have this to url's
site.com/hello-world/test.html
site.com/hello-world/test/test.html
if i go to the first url i have this regex
^.*/([a-z0-9,-]+)/([a-z0-9,-]+).html$
but url 2 is also vaild url with the regex? how to tell the regex that the first url is the url who should be vaild and not the second?
...
Using a Perl or unix regex, how would I capture a word that is not a range of values. Here is what I am trying to achieve.
(\w:not('int','long'))
...
Is there any published benchmark results about RegEx performance in .NET vs. unmanaged C++/C?
...
Hello,
Here's a short regex example:
preg_match_all('~(\s+|/)(\d{2})?\s*–\s*(\d{2})?$~u', 'i love regex 00– / 03–08', $matches);
print_r($matches);
The regex only matches '03–08', but my intention was matching '00–' as well. What is the problem? Anyone could explain?
...
Can regular expression be utilized to match any string except a specific string constant let us say "ABC" ? Is this possible to exclude just one specific string constant? Thanks your help in advance.
...
I want to be able to check a string to see if it has http:// at the start and if not to add it.
if (regex expression){
string = "http://"+string;
}
Does anyone know the regex expression to use?
...
whats the regex to validate a comma delimited list like this one 12365, 45236, 458, 1, 99996332, ......
thanks
...
Is it possible to use regular exprssions in css to selectively hide text?
I have some text
Product Pack: pack of 50 +£20.00
that I would like to display as with the monetry amount removed
Product Pack: pack of 50
Can I add to CSS a regular expression that twould do that?
...
Hi,
I'm looking for some example how to do regex search on SynEdit control in Delphi ?
I'd like to implement something like "grep" search in the current document ...
...
Hi this is my pice of code:
<div style="overflow: hidden; width: 445px;">[IMG]http://i29.tinypic.com/mydog.png[/IMG] tak si to http://i29.tinypic.com/mycat.png Lorem ipsum loremai <img width="15" border="0" align="middle" src="images/smejo.gif" valign="middle"/> <img src=http://www.example.com/index.png alt> <img sr...
Imagine this string:
if(editorPart instanceof ITextEditor){
ITextEditor editor = (ITextEditor)editorPart;
selection = (ITextSelection) editor.getSelectionProvider().getSelection();
}else if( editorPart instanceof MultiPageEditorPart){
//this would be the case for the XML editor
selection = (ITextSelection) editorPart.getEditor...
Hello,
This regex only allows alphanumeric characters and one period. I haven't be able to figure out how to set a quantifier to limit the number of characters to say between five and twenty. I'm using it in PHP.
/^([a-zA-Z0-9\.](?!\.)|[a-zA-Z0-9]*\.(?!\.))[a-zA-Z0-9]*$/
...
I was looking at email validation. I read in RFC specs that consecutive . (dot) are not allowed, like, [email protected].
But are different wild characters allowed to occur consecutively? Like, [email protected].
And if so, how do I make a regular expression which will take only single occurance of wild characters as long as they a...
Is it possible to use a three digit ASCII code in a PCRE regex? A space character is a two digit one (40). You need to add a zero and escape it like so: \040
...
Types of writing systems:
Alphabet
Abjad
Abugida
Syllabary
Logography
In regular expressions we need to tell which "chars" we want to validate:
We use something like this a-zA-Z0-9 to say that we accept all the alphanumeric.
How can we make regular expressions that validate other writing systems non-alphanumerics?
(how can I mak...
I have an English language forum site written in perl that is continually bombarded with spam in Russian. Is there a way using Perl and regex to detect Russian text so I can block it?
...