1
2
3
4
5
|
public
bool
IsTelephone(
string
str_telephone)
{
return
;
System.Text.RegularExpressions.Regex.IsMatch(str_telephone,
@"^(\d{3,4}-)?\d{6,8}$"
);
}
|
1
2
3
4
5
|
public
bool
IsHandset(
string
str_handset)
{
return
;
System.Text.RegularExpressions.Regex.IsMatch(str_handset,
@"^[1]+[3,4,5,8]+\d{9}"
);
}
|
1
2
3
4
5
|
public
bool IsIDcard(string str_idcard)
{
return
;
System.Text.RegularExpressions.Regex.IsMatch(str_idcard, @
"(^\d{18}$)|(^\d{15}$)"
);
}
|
1
2
3
4
5
|
public
bool IsNumber(string str_number)
{
return
;
System.Text.RegularExpressions.Regex.IsMatch(str_number, @
"^[0-9]*$"
);
}
|
1
2
3
4
5
6
7
8
9
10
|
public
bool IsPostalcode(string str_postalcode)
{
return
;
System.Text.RegularExpressions.Regex.IsMatch(str_postalcode, @
"^\d{6}$"
);
}
public
bool IsEmail(string str_Email)
{
return
;
System.Text.RegularExpressions.Regex.IsMatch(str_Email, @
"\\w{1,}@\\w{1,}\\.\\w{1,}"
);
}
|