Click here to Skip to main content
16,004,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: And the question is ... Pin
surfingcode18-Dec-07 2:39
surfingcode18-Dec-07 2:39 
GeneralPlease help on regular expression Pin
lordbearsg17-Dec-07 21:11
lordbearsg17-Dec-07 21:11 
GeneralRe: Please help on regular expression Pin
m@u17-Dec-07 21:24
m@u17-Dec-07 21:24 
GeneralRe: Please help on regular expression Pin
lordbearsg17-Dec-07 21:29
lordbearsg17-Dec-07 21:29 
GeneralRe: Please help on regular expression Pin
m@u17-Dec-07 21:46
m@u17-Dec-07 21:46 
GeneralRe: Please help on regular expression Pin
lordbearsg17-Dec-07 22:14
lordbearsg17-Dec-07 22:14 
GeneralRe: Please help on regular expression Pin
m@u17-Dec-07 22:31
m@u17-Dec-07 22:31 
AnswerRe: Please help on regular expression [modified] Pin
Sandilian17-Dec-07 21:58
Sandilian17-Dec-07 21:58 
/// using System.Text.RegularExpressions;(NameSpace for Regular Exprestion...)

public static bool IsAlphaNumeric(String strToCheck)
{
Regex objAlphaNumericPattern = new Regex(@"^[a-zA-Z0-9]*$");
return !objAlphaNumericPattern.IsMatch(strToCheck);
}

public static bool IsAlphaNumericWithSpace(String strToCheck)
{
Regex objAlphaNumericSpacePattern = new Regex(@"^[a-zA-Z0-9\s]*$");
return !objAlphaNumericSpacePattern.IsMatch(strToCheck);
}

public static bool IsNumericWithDot(String strToCheck)
{
Regex objAlphaNumericPattern = new Regex(@"^[0-9.]*$");
return !objAlphaNumericPattern.IsMatch(strToCheck);
}

public static bool IsNumeric(String strToCheck)
{
Regex objNumericPattern = new Regex(@"^[0-9]*$");
return !objNumericPattern.IsMatch(strToCheck);
}
public static bool IsAlphaNumericWithDot(String strToCheck)
{
Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9.]");
return !objAlphaNumericPattern.IsMatch(strToCheck);
}

public static bool IsAlphaNumericWithDotPeriodSpace(String strToCheck)
{
Regex objAlphaNumericPattern = new Regex(@"^[a-zA-Z0-9\s.,]*$");
return !objAlphaNumericPattern.IsMatch(strToCheck);
}

public static bool IsAlphaNumericWithDotPeriodSpaceHyphen(String strToCheck)
{
Regex objAlphaNumericPattern = new Regex(@"^[a-zA-Z0-9\s.,-]*$");
return !objAlphaNumericPattern.IsMatch(strToCheck);
}

public static bool IsAlphaNumericWithDotPeriodSpaceHyphenSlash(String strToCheck)
{
Regex objAlphaNumericPattern = new Regex(@"^[a-zA-Z0-9\s.,-/]*$");
return !objAlphaNumericPattern.IsMatch(strToCheck);
}

public static bool IsAlphaNumericWithSlash(String strToCheck)
{
Regex objAlphaNumericPattern = new Regex(@"^[a-zA-Z0-9/]*$");
return !objAlphaNumericPattern.IsMatch(strToCheck);
}

public static bool IsAmount(String strToCheck)
{
Regex objAlphaNumericPattern = new Regex(@"^(\d{1,12}|(\d{1,12}\.{1}\d{1,3}){1})$");
return !objAlphaNumericPattern.IsMatch(strToCheck);
}

public static bool IsAmountBECost(String strToCheck)
{
Regex objAmountPattern = new Regex(@"^(\d{1,8}|(\d{1,8}\.{1}\d{1,3}){1})$");
return !objAmountPattern.IsMatch(strToCheck);
}
<div class="ForumMod">modified on Tuesday, December 18, 2007 4:08:49 AM</div>
GeneralRe: Please help on regular expression Pin
leppie18-Dec-07 0:50
leppie18-Dec-07 0:50 
GeneralRe: Please help on regular expression Pin
lordbearsg18-Dec-07 20:45
lordbearsg18-Dec-07 20:45 
GeneralUsing resource strings Pin
ruanr17-Dec-07 20:59
ruanr17-Dec-07 20:59 
GeneralRe: Using resource strings Pin
CKnig17-Dec-07 22:17
CKnig17-Dec-07 22:17 
QuestionApplication settings in winforms programming C# Pin
Zerox MXI17-Dec-07 20:49
Zerox MXI17-Dec-07 20:49 
GeneralRe: Application settings in winforms programming C# Pin
Christian Graus17-Dec-07 22:05
protectorChristian Graus17-Dec-07 22:05 
GeneralRe: Application settings in winforms programming C# Pin
Mircea Puiu17-Dec-07 22:34
Mircea Puiu17-Dec-07 22:34 
QuestionDoubt in using several Datasets in same project? Pin
kssknov17-Dec-07 20:36
kssknov17-Dec-07 20:36 
AnswerRe: Doubt in using several Datasets in same project? Pin
CKnig17-Dec-07 21:39
CKnig17-Dec-07 21:39 
AnswerRe: Doubt in using several Datasets in same project? Pin
Paul Conrad24-Dec-07 19:54
professionalPaul Conrad24-Dec-07 19:54 
QuestionWhat should be Used?? Remoting/Web Services/Sockets Pin
ag4667717-Dec-07 20:32
ag4667717-Dec-07 20:32 
AnswerRe: What should be Used?? Remoting/Web Services/Sockets Pin
Mark Churchill17-Dec-07 20:42
Mark Churchill17-Dec-07 20:42 
GeneralRe: What should be Used?? Remoting/Web Services/Sockets Pin
ag4667717-Dec-07 21:59
ag4667717-Dec-07 21:59 
GeneralRe: What should be Used?? Remoting/Web Services/Sockets Pin
Mark Churchill17-Dec-07 22:13
Mark Churchill17-Dec-07 22:13 
GeneralRe: What should be Used?? Remoting/Web Services/Sockets Pin
ag4667717-Dec-07 22:22
ag4667717-Dec-07 22:22 
GeneralRe: What should be Used?? Remoting/Web Services/Sockets Pin
Mark Churchill18-Dec-07 0:01
Mark Churchill18-Dec-07 0:01 
GeneralRe: What should be Used?? Remoting/Web Services/Sockets Pin
darrenstokes18-Dec-07 4:10
darrenstokes18-Dec-07 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.