mash:
Deepak_Regex:
I used @" " ..but didn;t work for me.
I getting error in line just above the if statment...So it doesn't matter whether we use return _regularExpression.IsMatch(userDomainName);
or with if statment.
I used escape character for all "\" ..but it didn;t help me.
Somebody who know .NET,please try this expression and let me know what is solution for error.
Thanks,
The expression is fine, your code is the problem. All the character escapes are just for C# strings, nothing to do with regex in particular. You've typed something incorrectly. Even if you use @ you still have to escape double quotes in the pattern otherwise C# with think the string ended. If you don't use the at sign, you have to escape the backslash. Since you didn't post your modified code attempts, I can't see what you are or are not doing correctly.
HI
this is orginal expression which works fine when i tested in regex tool
^([a-z][a-z0-9.-]+)\\(?![\x20.]+$)([^\\/"[\]:|<>+=;,?*@]+)$
When i used above expression directly without any modification ,I was getting compile time error bcoz of double quotes C# compiler was thinking as end of string,so I have used one backward slash just before double quotes and also one backward slash just before the "\" in subpattern [\\]
here is code i am using .....
private const string ValidUserDomainNameRegularExpression = "^([a-z][a-z0-9.-]+)\\(?![\x20.]+$)([^\\/\"[\\]:|<>+=;,?*@]+)$"; private bool IsValidUserDomainName1(string userDomainName) {
bool isValid = false; _regularExpression = new Regex(ValidUserDomainNameRegularExpression, RegexOptions.IgnorePatternWhitespace); if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
_regularExpression = new Regex(ValidUserDomainNameRegularExpression, RegexOptions.IgnorePatternWhitespace); if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
bool isValid = false; _regularExpression = new Regex(ValidUserDomainNameRegularExpression, RegexOptions.IgnorePatternWhitespace); if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
_regularExpression = new Regex(ValidUserDomainNameRegularExpression, RegexOptions.IgnorePatternWhitespace); if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
private bool IsValidUserDomainName1(string userDomainName) {
bool isValid = false; _regularExpression = new Regex(ValidUserDomainNameRegularExpression, RegexOptions.IgnorePatternWhitespace); if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
_regularExpression = new Regex(ValidUserDomainNameRegularExpression, RegexOptions.IgnorePatternWhitespace); if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
bool isValid = false; _regularExpression = new Regex(ValidUserDomainNameRegularExpression, RegexOptions.IgnorePatternWhitespace); if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
_regularExpression = new Regex(ValidUserDomainNameRegularExpression, RegexOptions.IgnorePatternWhitespace); if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
if (_regularExpression.IsMatch(userDomainName)) {
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
{
isValid = true; }
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
return isValid; }
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....
}
I tried using "@" ,but didn;t worked for fine...
Please let me know what is right solution....