Regular Expression To Get Two Distinct Numbers From A String?
Jun 10, 2010
Suppose i have this input string "3rd position 5th time"
I want to write a Regular Expression to get 3 and 5 in a String like this "3 5" i.e., 3 and 5 both will be in a String but having a space. 3 and 5 may be any numbers like 12 or 13 ony any other numbers. For this i wrote this Regular Expression
Dim regexpression As
String =
"^[0-9]*+[0-9]"
but its not working .I am unable to get the logic.
View 5 Replies
Similar Messages:
Sep 20, 2010
i have to check if an input string is valid based on the given regular expression.. this is the regular expression.
(a(bb+aaa+((ab)*bb+(aba)*aa)(a+b)*) + (b(aa+bbb+((ba)*aa+(bab)*bb)(a+b)*)
+ is an OR
* is a LOOP, it is optional, it may be done as many as a user wants.
i've tried many ways to solve the problem that my professor gave me but my knowledge isn't that enough to solve this problem..
View 3 Replies
Jul 13, 2010
How can I use a Regular Expression Validator to ensure that only a number like 3.00 is entered into a text box?
View 1 Replies
Nov 22, 2010
Need reg exp for following.
May not repeat same number or letter more than 3 times.
May not contain more than 3 sequential number or letters in a row.
View 5 Replies
Jun 3, 2010
I have a text box which accepts CVV code of 3 or 4 numbers and im using regular expression validator
this is wat im using : is this correct way of using or not
code : ValidationExpression="(d{3,4}$"
View 1 Replies
Jan 4, 2011
i need a regular expression that should accept indian mobile numbers. for example...
9788812345
9876512345
7891234567
8122212345
View 3 Replies
Jan 4, 2011
I need a regular expression that only excepts numbers divisible by 1.5. I checked regex library and they have nothing on it.
View 4 Replies
May 5, 2010
I am using regular expression validator for Numbers, Comma and Decimal.. The expression is given below.
mNumValidator.ValidationExpression = "^(d|,)*.?d*$"
Now I would like to have 5 digits behind decimal.
View 7 Replies
Jan 12, 2011
I need to validate the text box at server side by using regular exp which should accept 1 or 2 or 3 or 4 or 5 digits numbers .Need to restrict decimal part.
Ex: 1 or 23 or 455 or 5643 or 45667 --Should accept.
1.3, .2, 33.3 , 444.55 ,5555.99 -- should not accept.
View 3 Replies
Mar 8, 2010
I'm wanting to remove all the special characters (leaving only numbers) in a phone textbox. Here is my current code:
Regex.Replace("(123)456-7890", "[\(\)\-\.+]", "");
View 2 Replies
Sep 2, 2010
I am really struggling with this! Using the regular expression validator I created an expression, thus ":" to show an error message if the user tries to enter in a name that contains a colon. What I am getting is the error message showing even when there is no colon (:) in the string. What am I doing wrong?
View 4 Replies
Sep 13, 2010
I have the following regular expression replacement:
[Code]....
how to exclude certain string
View 4 Replies
Jan 19, 2011
I am working on a web application in which I am getting a string from database and breaking it to use it. This is the string: string str = "DB1031229";
But sometimes I am not getting proper results. I need to break it in :
DB
10
1229
You can notice that I have not included 3 in that. I dont need that.
View 1 Replies
May 4, 2010
give me Regular expression for validation string that must have at least one alphabet and at least one numeric value?
View 7 Replies
Mar 4, 2010
I'm having a TextBox and it can be accept only the string like "49=N,38=S,56=S,......"
so can u tell me how can i create my regular expression for validate above string.
View 2 Replies
Apr 26, 2010
I am new to regular expression. Could you give me the syntax in asp.net??
The textbox string should be int value, non zero, non-negative.
View 6 Replies
Aug 4, 2010
I am trying to capture instances of '&#' in a string using a regular expression.
The best validation expression I can come up with is [^&#]*
This captures &# but unfortunately also captures & and # on their own.
How do I make the expression only look for &# together?
View 4 Replies
Jul 21, 2010
I'm trying to write a validator for an ASP.NET txtbox.
How can I validate so the regular expression will only match if the 6th character is a "C" or a "P"?
View 5 Replies
Feb 25, 2010
I need a way to create a regular expression from a string or an array of domain names. for example string array = [URL]. Once I click save I would want to create a regular expression that would match all 3 with or without '.com' extension. Then Another task would be to pull this data out of regular expression and put it back into an array.
View 5 Replies
Nov 19, 2010
understood me how can i make a regular expression that allow all the mismatch case and don't a match case
ex: ".aspx"
( when i put any thing in text box it allow ----a ,ab ,adn.jpg ) result=true (but when i put =.aspx ) result= false
View 5 Replies
Feb 16, 2010
I'm trying to use the validator to work on a email form to ensure that they enter a valid from email address. That part works. I also want to add to the expression the text that I pre-populate in the txtbox ("Enter your email address") so on postback, after sending the message, I can clear the fields and repopulate that box.
How do I add that wording to the current expression: w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*
View 4 Replies
Feb 2, 2011
I am using Regular Expression validator for a text box. The below is working fine.It is not performing validation when I enter values like 0000..001.How can I modify validation expression? But it would allow values like 100,...5000 i.e zeros after a number.
<asp:RegularExpressionValidator ID="reg2" runat="server" ControlToValidate="rng2"
ValidationExpression="^[0-9]+" ErrorMessage="*Please Enter a Valid Number for Second Range."
ForeColor="Red" Font-Bold="True"></asp:RegularExpressionValidator>
View 2 Replies
Dec 1, 2010
I need some help in regular expression.I am validating the textbox text when updating the records.When i click the update button,the first 5 letters should be equal to CM000 or cm000.How to validate this using regular expression in asp.net. does anyone know validationexpression for this.
View 1 Replies
Oct 4, 2010
I need a regular expression for support both date formats dd-MMM-yyyy and dd-MMM.
Ex:
04-Oct-2010
04-Oct
04-OCT-2010
04-OCT
View 3 Replies
May 11, 2010
Regex rxQuarter = new Regex("d{5}"); why i get a error when i use this regular expression..its not recognising the "d"
View 2 Replies