/* package whatever; // don't place package name! */
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
String stringQualquer
= "um teste qualquer12/02/1998 19/09/1880 Nulo";
Pattern pattern = Pattern.compile("(\\d{2}/\\d{2}/\\d{4})");
Matcher matcher = pattern.matcher(stringQualquer);
if(matcher.find()) {
System.
out.
println(matcher.
group()); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC5yZWdleC5NYXRjaGVyOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4LlBhdHRlcm47CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN0cmluZyBzdHJpbmdRdWFscXVlciA9ICJ1bSB0ZXN0ZSBxdWFscXVlcjEyLzAyLzE5OTggMTkvMDkvMTg4MCBOdWxvIjsKCQkKCQlQYXR0ZXJuIHBhdHRlcm4gPSBQYXR0ZXJuLmNvbXBpbGUoIihcXGR7Mn0vXFxkezJ9L1xcZHs0fSkiKTsKCQkKCQlNYXRjaGVyIG1hdGNoZXIgPSBwYXR0ZXJuLm1hdGNoZXIoc3RyaW5nUXVhbHF1ZXIpOwoKCQlpZihtYXRjaGVyLmZpbmQoKSkgewoJCQlTeXN0ZW0ub3V0LnByaW50bG4obWF0Y2hlci5ncm91cCgpKTsKCQl9Cgl9Cn0=