Question

Infosys
IN
Last activity: 17 Feb 2021 10:12 EST
Validate Specific character in String
HI,
I have a requirement to validate clipboard properties having specific character.
String pattern – ^[a-zA-Z 0-9 \- \\ _ /]{0,50}$
If the string have any other character, i have to reject it.
i have tried function rule to validate the string value but still unable to get proper format.
Please help here.
Java Code written in Function rule:
if (strInput .equals("")){
return true;
}
String validURLstr = ("–^[a-zA-Z0-9 \\_/]$");
return java.util.regex.Pattern.matches(validURLstr,strInput);
Thanks in Advance.
***Updated by moderator: Lochan to update platform capability***