upi validation regex code example
Example 1: upi id regex
/^\w.+@\w+$/.test('rishi.21@axis')
/^\w.+@\w+$/.test('shruti@PNB')
/^\w.+@\w+$/.test('98765__210@upi')
Example 2: upi id regex
public static boolean validateUPI(String upi){
final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile("^(.+)@(.+)$", Pattern.CASE_INSENSITIVE);
Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(upi);
return matcher.find();
}