Need Regular Expressions for asp.net [closed] - regex

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.

Related

Regular expression in asp.net, containing either two fixed alphabets(D and DQ) or any two numbers [closed]

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.
I want to validate a text box (with max length 2) to contain only these 3 set of values.
(i) 00-99
(ii) Q
(iii) DQ
Invalid values are 1Q, 2D, QD, QQ, DD,etc etc
Alright you can use the following it will check for what you asked for its very simple and primitive regix but will work:
\d{2}|DQ|Q
If you want to better understand regular expressions the following might help:
http://msdn.microsoft.com/en-us/library/az24scfc.aspx
You can also use:
http://myregextester.com/index.php
As a tool to test your regix.
Hope that helps

please assist with this regex [closed]

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.
I am trying to write a regex for only the text that is in the parenthesis, INCLUDING the parenthesis in the following sentence: ""Here is a house. The house is blue. (12.6)"". So I want to select --> (12.6) <--
Something like:
\(\d+\.\d+\)
This is assuming you'll have only digits in that sub-string, and always in the form: (xy.zd)
Since I have no clue what language, tool, pattern, wtv you're using, I'm just leaving the basic regex.
In JavaScript this regex returns an array of the text items surrounded with brackets:
"Here is a house. The house is blue. (12.6) (3)".match(/\([^\)]*\)/g);
Returns:
["(12.6)", "(3)"]
Cheers.

Regex to determine if string contains all the vowels? [closed]

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

What characters should this regex cover [closed]

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).

CLIA Regular Expression [closed]

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}$/