Java regex non-capturing group "?:"
- see: http://stackoverflow.com/questions/3512471/non-capturing-group
- usage:
(?:http|ftp)://([^/\r\n]+)(/[^\r\n]*)?
-
Match "http://stackoverflow.com/" Group 1: "stackoverflow.com" Group 2: "/" Match "http://stackoverflow.com/questions/tagged/regex" Group 1: "stackoverflow.com" Group 2: "/questions/tagged/regex"