So How do you format phone numbers and things like that in C#? In perl it would be a pretty simple regular expression to format 4445556666 into (444)-555-6666 but I haven't easily found how to do that with C# in Visual Studio 2005 yet. Learning is fun. … Discussion Thread by jerryodom in Software Development
c#
this can be achieved by use of "System.Text.Regularexpression"namespace and by using "Regex" class of this namespace.you can use meyhods of this class to help fulfill tasks :regards Reply by Aun Muhammad
10 Years Ago
So How do you format phone numbers and things like that in C#? In perl it would be a pretty simple regular expression to format 4445556666 into (444)-555-6666 but I haven't easily found how to do that with C# in Visual Studio 2005 yet. Learning is fun. … Discussion Thread by jerryodom in Software Development
c#
this can be achieved by use of "System.Text.Regularexpression"namespace and by using "Regex" class of this namespace.you can use methods of this class to help fulfill tasks :regards Reply by Aun Muhammad
10 Years Ago
Hi , I wanted to know how to write a c# code that reads from a file and counts the number of lines . This count should exclude the comments present eg : //this is test using System; should not count "//this is test" at all . Please … Discussion Thread by shuchimuley in Software Development
c#
i gotta use regex.match(regularexpression) . I am using a streamreader … Reply by shuchimuley
10 Years Ago
I need to figure out how to bind data and call it back anywhere on the page. Basically, this is what I am trying to do. Keep in mind that I am an asp programmer and am very new to ASP.NET. I have build a custom login page that works. Now I need to … Discussion Thread by SheSaidImaPregy in Web Development
… safe, you must use a RegularExpression validator or your own custom… Reply by hollystyles
9 Years Ago
Hi, I am working on a Desktop application using C# .NET Looking for some code that does 'email syntax validation' and 'send mail' tasks. Since it is not a web based application this cannot be done using Web based namespaces etc. Can anyone … Discussion Thread by Prasadd in Software Development
c#
hi, Prasadd Use `RegularExpression.RegEx` class here is example … Reply by chirag.3g
8 Years Ago
I m using asp.net 3.5(visual studio 2008) and sql server 2005/2000. I want code for validation of Account number and password. i.e. when user enter the Accountno and password and click submit button it should check the data with that enter in database. … Discussion Thread by Rockstar_021 in Software Development
c#
use RegularExpression validators or simply set textbox's maxlenght property to 12 and 8 respectively. Reply by virang_21
8 Years Ago
…: 0711-224 WARNING: Duplicate symbol: .RegularExpression::RegularExpression(co nst char*) ld: 0711…-224 WARNING: Duplicate symbol: .RegularExpression::Init(const char*) ld: 0711… Discussion Thread by etc123 in Software Development
c++
8 Years Ago
I need an email validator in C#... i never written a letter C#... i found this: public static bool isEmail(string inputEmail) { inputEmail = NulltoString(inputEmail); string strRegex = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}&… Discussion Thread by amorphis88 in Software Development
c#
[code=C#]using System.Text.RegularExpression;[/code] [code=vb.net]Imports System.Text.RegularExpression[/code] Reply by Ramy Mahrous
8 Years Ago
i just want to compare two dates both are in two text boxes in formate of dd/mm/yyyy how can i do this Discussion Thread by pupilstuff in Web Development
Use built-in validators like: compare validtor RegularExpression validator Reply by b1izzard
8 Years Ago
i just want to compare two dates both are in two text boxes in formate of dd/mm/yyyy how can i do this Discussion Thread by pupilstuff in Web Development
…-in validators like: compare validtor RegularExpression validator[/QUOTE] Set UICulture &… Reply by __avd
8 Years Ago
Is there a way to set up a system there extracts SWFs from a webpage automatically? It would be something were you have a text box and you enter the URL of a page into it. The page contains a SWF. The program goes looking in that page and finds all the… Discussion Thread by jonow in Web Development
… enough experience in using (AJAX+RegularExpression), then i can say&… Reply by essential
8 Years Ago
I was wondering if anyone could give me the code for email validation on a textbox named, txtEmail. I have used a validator but there is a problem with IIS7 and this so i need to code it behind the text box. I would like to inform the user that they … Discussion Thread by erictheking1 in Software Development
c#
Welcome erictheking1. You should post your question in ASP.NET forum. Regarding to your problem you must have use javascript with RegExp (regular expression) pattern or RegularExpression Validator control. Reply by __avd
8 Years Ago
hi im again,,,,,, thanx for daniweb i get the solution to my 1st problum. now the second problum; i have a textbox on my windows form and i need to validate it. rule is user must not able to press any A-Z && a-z && !-* keys on the … Discussion Thread by chathuD in Software Development
c#
… some flexibility I argue using RegularExpression pattern = ..... Then if this text… Reply by Ramy Mahrous
8 Years Ago
Hi, Please anyone help me out............ I want the users to enter the data in the textbox of the minimum length of "10" and maximum length can be "ANY"(or above "10"). Thanks in … Discussion Thread by santhanalakshmi in Web Development
You can use a RegularExpression validation for this purpose. [code] &… Reply by Ramesh S
7 Years Ago
please someone help me to create a regular expression for "123456789V" this kind of pattern... 1st 9 places should be numbers and 10th place should be "V" argent thnx in advanced Discussion Thread by mahesh9100 in Web Development
write in regularexpression ^[0-9]{9}[a-zA-Z]$ i t will work for u Reply by suryasasidhar
7 Years Ago
Hi I use Visual 08 ASP.NET C# and JavaScript I would like to do the following validation on a text box the length MUST be 12 characters long in the following format LLLLLLNNNNNN Where L = Letters N = Numbers if the users input does not match the … Discussion Thread by cVz in Web Development
hi saradha add this code to regularexpression ' \w{6}\d{6}' and it will work if not send message Reply by suryasasidhar
7 Years Ago
hey buddies:) here is login page for begining purpose in asp.net i hope you will enjoy it and it is expected there is some mistakes also so please feedback it. Thanks Code Snippet by nandux8 in Web Development
… sure if you want that regularExpression for email. If you select… Reply by guru_sarkar
7 Years Ago
Hi, Please anyone help me out............ I want the users to enter the data in the textbox of the minimum length of "10" and maximum length can be "ANY"(or above "10"). Thanks in … Discussion Thread by santhanalakshmi in Web Development
…;993164]You can use a RegularExpression validation for this purpose. [code… Reply by kailasgorane
7 Years Ago
…; Employee Name")] [StringLength(15)] [RegularExpression("[a-zA-Z]{5…] [DisplayName("Contact Number")] [RegularExpression("^9[0-9]{8… Discussion Thread by sakhi kul in Web Development
7 Years Ago
JAVA SCRIPT CODE [CODE] function NumbrOnly() { if(event.KeyCode==45 || event.KeyCode==46 || event.KeyCode==48 || event.KeyCode==49 || event.KeyCode==50 || event.KeyCode==51 || event.KeyCode==52 || event.KeyCode==53 || event.KeyCode==54 || event… Discussion Thread by jamshed ahmed in Web Development
you can use System.Text.RegularExpressions.Regex or RegularExpressionValidator Control here are some sample link of regularexpression [url]http://regexlib.com/DisplayPatterns.aspx?cattabindex=2&categoryId=3[/url] Reply by zid8ne
7 Years Ago
Hey Guys : Here The problem is :to have a program to check the -(sys.argv) is long enough to have more than 3 elements if not then print "input more " -check (sys.argv) contain a specific elements for ex(P) ,& if P is found in… Discussion Thread by Robertbra in Software Development
… cannot use [ICODE]aString.index(regularExpression)[/ICODE] but must use [ICODE…]match = regularExpression.search(aString)[/ICODE]. Once you… Reply by griswolf
7 Years Ago
Hi..!! i have created a Customer Details form in C# asking detail about customer...One of its field asks for customer email.. Please tell me how to validate a email id..Thnx..!! Discussion Thread by Prashant20 in Software Development
c#
… this you have to use RegularExpression class in this there is… Reply by pritesh2010
7 Years Ago
[code] public partial class Form1 : Form { int row, col; int num = 0; public Form1() { InitializeComponent(); } private void generatebutton_Click(object sender, EventArgs e) … Discussion Thread by khanrock in Software Development
c#
Its not even letting me include System.RegularExpression. Can you provide a alternative. Reply by khanrock
7 Years Ago
[code] public partial class Form1 : Form { int row, col; int num = 0; public Form1() { InitializeComponent(); } private void generatebutton_Click(object sender, EventArgs e) … Discussion Thread by khanrock in Software Development
c#
… even letting me include System.RegularExpression.[/QUOTE]That's because I… Reply by Lusiphur
7 Years Ago
… starttimeInput and endtimeInput that have regularexpression validators to only accept input… Discussion Thread by dougancil in Web Development
6 Years Ago
Hello I want to use a CustomValidator using ASP.NET/C# to make sure a textbox isnt empty (no spaces, no blanks, no nulls, etc) How do I do it? Thanks Discussion Thread by riahc3 in Web Development
… textbox is not empty. The RegularExpression Validator checks to see that… Reply by Freon22
6 Years Ago
Hi everyone, I know you probably see a hundred of these during this time of year, but I have a project going at uni that requires us to create a string based hangman game from scratch. It's not anything fancy, and the game itself isn't too complicated, … Discussion Thread by ChrisXL in Software Development
…[/URL] used with str.match(regularexpression) look up all the methods… Reply by Gerbiler
6 Years Ago
I need a RegularExpression that can convert a string from a fraction or decimal like "1/2" or "0.5" to a decimal "0.5". It needs to handle both cases. Input can be either fractional or decimal, output must be decimal... Discussion Thread by tim8w in Software Development
6 Years Ago
Hello all. If there is one aspect of any language I cannot understand it is regex. I have some strings I need to parse, of varying length and content, but there are patterns. There 2 base types the first always begins with [B]%zn%[/B] and can … Discussion Thread by Suzie999 in Software Development
c#
…; using System.Text.RegularExpressions; namespace RegularExpression { class Program { public static bool… Reply by Alan81
6 Years Ago
I have script which will run across multiple pages I don't know about. Say I want to replace some text within it. I attempt to do it by looping through every element on the page and checking if it matches the regex before replacing it but keep getting this… Discussion Thread by asif49 in Web Development
…(function() { return $(this).blah().match(regularExpression); }).each(function() { $(this).html($(this… Reply by asif49
4 Years Ago