It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need a regular expression for CLIA number. CLIA number is combination alpbh numeric without any spaces. Now i am using this expression /^[A-Za-z0-9]{10}$/ am i using correct expression?
you can use this....
/^[a-Z]{4}[0-9]{6}$/
^ this is used to beginning of the line.
$ end of the line.
a-Z this will match the both cases.
this case will match the four alpha character and six numbers. so totally 10 alphanumbers.
Based on your example, it sounds like you want the first four characters to be "CLia" followed by 6 digits? If so, use /^CLia\d{6}$/. If not, be more specific.
If your language support POSIX classes :
/^[[:alnum:]]{10}$/
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
here is my web list
mywebsite/
mywebsite/myweb.html
mywebsite/children1
mywebsite/clidrend2
mywebsite/clidrens3
mywebsite/clidrend4
mywebsite/parent1/S2
mywebsite/parent1/S3
mywebsite/parent1/S4
how do I just have
mywebsite/myweb.html
mywebsite/
and ignore the others.
here is my regex
mywebsite/|mywebsite/myweb.html
Done it :-) thanks everyone
^mywebsite\/myweb\.html|mywebsite\/$
Is this what you want as a result?
mywebsite(/m.*|/)
You could try the following, I could be more precise if you show us the regex you are actually using.
(WhateverYouAreUsing){2}
(...) is a group and {...} is a quantifier, it will take exactly two of the matches you are looking for. {1,2} will take at least one and at maximum two, in case there is only one and you still want to get a match.
Put some parentheses in your regex and escape the .:
(mywebsite/)|(mywebsite/myweb\.html)
Alternatively, for something a little more general:
(\w+/)|(\w+/\w+\.html)
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
For example the desired Regex would successfully match "areriroru" but wouldn't match "sadwdij" which contains just two of the vowels.
In C#, you can use lookahead assertions for each vowel before matching the string with .*:
(?=.*a)(?=.*e)(?=.*i)(?=.*o)(?=.*u).*
If you don't care about the case of your vowels, you could use this:
(?=.*[Aa])(?=.*[Ee])(?=.*[Ii])(?=.*[Oo])(?=.*[Uu]).*
One possibility is enumerating all the permutations of the vowels. Here are the first 24 of 120 total (all the ones where a is the first vowel). Note that this forms one long expression, but I split it into lines here for clarity.
a.*e.*i.*o.*u
|a.*e.*i.*u.*o
|a.*e.*o.*i.*u
|a.*e.*o.*u.*i
|a.*e.*u.*i.*o
|a.*e.*u.*o.*i
|a.*i.*e.*o.*u
|a.*i.*e.*u.*o
|a.*i.*o.*e.*u
|a.*i.*o.*u.*e
|a.*i.*u.*e.*o
|a.*i.*u.*o.*e
|a.*o.*e.*i.*u
|a.*o.*e.*u.*i
|a.*o.*i.*e.*u
|a.*o.*i.*u.*e
|a.*o.*u.*e.*i
|a.*o.*u.*i.*e
|a.*u.*e.*i.*o
|a.*u.*e.*o.*i
|a.*u.*i.*e.*o
|a.*u.*i.*o.*e
|a.*u.*o.*e.*i
|a.*u.*o.*i.*e
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
\\s*[\\-]?[\\d]{1,3}\\s+[\\-]?[\\d]{1,3}\\s+[\\-]?[\\d]{1,3}\\s+[\\-]?[\\d]{1,3}\\s*
I have this regex for taking in 4 coordinates which are whole numbers (positive or negative). Can you please suggest any bugs in this regex?
If it's a Java regex, then it's correct for matching a string that contains four integer numbers between -999 and 999, separated by whitespace. It's very ugly, though, and could be simplified a lot:
\\s*(?:-?\\d{1,3}\\s+){3}-?\\d{1,3}\\s*
If it's not Java, then you only need one backslash at a time (but you might need other syntax, depending on your language).
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need a regular expression for a password to fulfill the following requirements:
It must be at least 6 characters long
There must be 1 numeric character
The first and last character must be an alphabetic character
No special characters
I've found some expressions that come close to this, but none that match what I need.
Any help you can provide would be greatly appreciated.
I've tried this but it doesn't quite fit the bill:
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$
Assert that a string has 6 or more characters:
(?=.{6,})
Assert that a string has at least 1 numeric character:
(?=.*\d)
Match an alphabetic character in the first and last position:
^[A-Za-z].*[A-Za-z]$
Combining all of the above, yields the following final expression:
(?=.{6,})(?=.*\d)[A-Za-z][A-Za-z0-9]*[A-Za-z]
try something like this
(?=.*\d)^[A-Za-z][0-9A-Za-z]{4,}[A-Za-z]$
or in the case that you want ONLY one numeric it would be this
(?=[^\d]*\d[^\d]*$)^[A-Za-z][0-9A-Za-z]{4,}[A-Za-z]$
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I have three text boxes. I need:
Regular expression to only allow 3 upper case alphabets. No empty strings and no numbers
Regular expression to allow only 3 numbers. no empty strings
Regular expression for 5 or fewer uppercase alphabets only. no empty strings, no numbers
This should do it:
1. ^[A-Z]{3}$
2. ^[0-9]{3}$
3. ^[A-Z]{1,5}$
Expresso is a usefull regular expression tool that allows you to build your own regular expressions by selecting options from a form. It will be very easy to create what you have asked for above.