Can someone give me the regular expression to match something like /this/is/the/path or /this/is/the/path/ and matches like:
$1=this
$2=is
$3=the
$4=path
([^/]+)/ matches one, but I'm not quite sure how to get it to repeat.
FYI: this is for a mod rewrite RewriteRule match.
Does anyone know of a regular expression for matching on a sequence of four numbers? I need a match on ascending (1234), descending (4321), or the same (1111).
Looking for some help with a Regular Expression to do the following:
Must be Alpha Char
Must be at least 1 Char
Must NOT be a specific value, e.g. != "Default"
Thanks for any help,
Dave
I need a regular expression to validate string with one or more of these characters:
a-z
A-Z
'
àòèéùì
simple white space
FOR EXAMPLE these string are valide:
D' argon calabrò
maryòn l' Ancol
these string are NOT valide:
hello38239
my_house
work [tab] with me
I tryed this:
re.match(r"^[a-zA-Z 'òàèéìù]+$", self.cleaned_data['title'].strip())
It seems to work in my python shell but in Django I get this error:
SyntaxError at /home/
("Non-ASCII character '\\xc3' ...
Why ?
I'm looking for a regular expression that can extract the href from this:
<a href="/tr/blog.php?post=3593&user=930">
There are hundreds of links on the page so I need to extract only those that contain
/tr/blog.php
So in the end I should be left with a list of links that start in /tr/blog
Thanks for any help. It's really puzzling me.
I am trying to build a regular expression in javascript that checks for 3 word characters however 2 of them are are optional. So I have:
/^\w\w\w/i
what I am stumped on is how to make it that the user does not have to enter the last two letters but if they do they have to be letters
I've been struggling to figure out how to best do this regular expression.
Here are my requirements:
Up to 8 characters
Can only be alphanumeric
Can only contain up to three alpha characters [a-z] (zero alpha characters are valid to)
Any ideas would be appreciated.
This is what I've got so far, but it only looks for contiguous letter characters:
^(\d|([A-Za-z])(?!([A-Za-z]{3,}))){0,8}$
I am not very good, with regular expression in php I am trying to get a reg_expression to find all file names such as /file-name-here.php and make it bold.
This expression works in Flash but not in php it also doesn't accept the '-' i'm not sure why i can't get it to work with preg_replace
/(https?://)?(www\.)?([a-zA-Z0-9_%]*)\b\.[a-z]{2,4}(\.[a-z]{2})?((/[a-zA-Z0-9_%]*)+)?(\.[a-z]*)?/g
I current have the following regular expression to accept any numeric value that is seven digits
^\d{7}
How do I improve it so it will accept numeric value that is seven or ten digits?
Pass: 0123456, 1234567, 0123456789, 123467890
Fail: 123456, 12345678, 123456789
I need a regular expression that matches three consecutive characters (any alphanumeric character) in a string.
Where 2a82a9e4eee646448db00e3fccabd8c7 "eee" would be a match.
Where 2a82a9e4efe64644448db00e3fccabd8c7 "444" would be a match.
etc.
Hi all,
I cannot manage to get a working regular expression (for use in ASP.NEt Validataor) for the following criteria:
- I want all chars from A-Z a-z 0-9
- I don't want the Enter key
I have the expression: [\w\s,.-/]*[^\n]
but that don't works.
Please give-me a hint, Thanks.
I Need a regular expression which accepts all types of characters (alphabets, numbers and all special characters), and miniumum number of characters should be 15 and no limit for maximum characters.
I write regular expression for alphanumerics, but it is not taking space.
I want space (whitespace between characters).
I write like this:
^[a-zA-Z0-9_]*$
I write regular expression for alphanumerics, but it is not taking space.
I want space (whitespace between characters).
I write like this:
^[a-zA-Z0-9_]*$
I have a string 1/temperatoA,2/CelcieusB!23/33/44,55/66/77 and I would like to extract the words temperatoA and CelcieusB.
I have this regular expression (\d+/(\w+),?)*! but I only get the match 1/temperatoA,2/CelcieusB!
Why?
The input: we get some plain text as input string and we have to highlighight all urls there with {url
For some time i've used regex taken from http://flanders.co.nz/2009/11/08/a-good-url-regular-expression-repost/, which i modified several times, but it's built for another issue - to check whether the whole input string is an url or no.
So, what regex do you use in such issues?
Can't believe how difficult this seems to be all I want to is to validate a user inout using javascript to make sure that it is an email address. But can't get it to work:
I am using:
//validates a regulaer expression
Utilities2.prototype.validateEmail = function(stringToValidateArg)
{
alert('about to check regexp');
var regExpPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
alert(regExpPattern.test(stringToValidateArg));
}
But this always returns false, any ideas why is it because of the regular expression?
Hello,
I am in dire need of a such regular expression where my alphabet is made up of 0s and 1s.
Now I need a language that accepts all words as long as it has three 0s.
IE:
000
10001
0001
1000
10000101
Hello Everyone,
Just seeking a favour to write a regular expression to match the following set of strings. I want to write an expression which matches all the following strings TCL
( XYZ XZZ XVZ XWZ )
Clue : Starting string is X and Z ending string is same for all the pairs. Only the middle string is differs Y Z V W.
My trial: [regexp {^X([Y|Z|V|W]*)Z$}
Hello Everyone,
Just seeking a favour to write a regular expression to match the following set of strings. I want to write an expression which matches all the following strings TCL
i) ( XYZ XZZ XVZ XWZ )
Clue : Starting string is X and Z ending string is same for all the pairs. Only the middle string is differs Y Z V W.
My trial: [regexp {^X([Y|Z|V|W]*)Z$}]
I want to write an another regexp which catches/matches only the following string wherever comes
ii) (XYZ)
My trial: [regexp {^X([Y]*)Z$}]