You need to sign in to do that
Don't have an account?
vijendhar k 25
regular expression help- urgent
Helo all,
I need one regular expression pattern, in that i have to verify string contains at least one upper or lower case character or one number i dont have problem with position. if string contains only special charactors it will be invalid. EX : @#@#@# invalid string !@$%^&a - valid string !@$$)(&A - valid string !@$$)(&1 - valid string
can you please help me to prepare Pattern String regExp = '([a-zA-Z0-9]*)';
String[] regExps = new string[]{'@#@#@#','@#@#@#a ','@#@#@#A','@#@#@#1'};
for(string regEx : regExps)
{
//system.debug('regEx== '+regEx); Matcher m = Pattern.compile(regExp).matcher(regEx); if(m.matches()) { System.debug(regEx); }
}
I need one regular expression pattern, in that i have to verify string contains at least one upper or lower case character or one number i dont have problem with position. if string contains only special charactors it will be invalid. EX : @#@#@# invalid string !@$%^&a - valid string !@$$)(&A - valid string !@$$)(&1 - valid string
can you please help me to prepare Pattern String regExp = '([a-zA-Z0-9]*)';
String[] regExps = new string[]{'@#@#@#','@#@#@#a ','@#@#@#A','@#@#@#1'};
for(string regEx : regExps)
{
//system.debug('regEx== '+regEx); Matcher m = Pattern.compile(regExp).matcher(regEx); if(m.matches()) { System.debug(regEx); }
}
Please mark the thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.