Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///expressão regular para controlar o IP valido
- String _255 = "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";
- Pattern p = Pattern.compile("^(?:" + _255 + "\\.){3}" + _255 + "$");
- RegexFormatter ipFormatter = new RegexFormatter(p);
- txtip.setFormatterFactory(new DefaultFormatterFactory(ipFormatter));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement