Created
March 24, 2017 10:57
-
-
Save TopHatCroat/fc7b13f9e767d7c626bd11dc8f2ace47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String adminRegex = "^(-admin)? ?-server (?:(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6})|(localhost)) -port ([8|9][0-9]{3}) -u ([a-zA-Z0-9-_]+) -p ([a-zA-Z0-9-_!#]+) -(pause|stop|start|stat)$"; | |
String userRegex = "^(-korisnik)? ?-s (?:(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6})|(localhost)) -port ([8|9][0-9]{3}) -u ([a-zA-Z0-9-_]+) ?(-(a|t) (?:(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6})|(localhost)))? ?(-w ([0-6][0-9]{2}))?$"; | |
String showRegex = "^(-prikaz)? ?-s ((:?([a-zA-Z]:|(http:(?:\\\\|\\/))))?(?:(?:\\\\|\\/)?(\\w[\\w ]*.*))+\\.(?:(?i)bin(?-i)))$"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
userRegex, ne matcha http/https za -a | -t .. isto -w se mora upisati 001 za 1, umjesto samo 1... fix:
String userRegex = "^(-korisnik)? ?-s (?:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6})|(localhost)) -port ([8|9][0-9]{3}) -u ([a-zA-Z0-9-_]+) ?(-(a|t) (?:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(((http:\/\/)|(https:\/\/))([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6})|(localhost)))? ?(-w (([1-9]{1})|([1-9]{1}[0-9]{1})|([1-5]{1}[0-9]{0,2})|600))?$";