Answers for "java 8 validate based on pair of strings"

1

java 8 validate based on pair of strings

Pair<Integer, String> pair = new Pair<>(1, "One");
Integer key = pair.getKey();
String value = pair.getValue();
Posted by: Guest on April-03-2020
0

java 8 validate based on pair of strings

String input = "one=1&two=2";
Pattern p = Pattern.compile("^(?:\\w*=\\d*(?:&|$))+$");
Matcher m = p.matcher(input);
if (m.matches()) System.out.println("Matches!");
Posted by: Guest on April-03-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language