What is a non-capturing group in regular expressions?

Let me try to explain this with an example. Consider the following text: http://stackoverflow.com/ https://stackoverflow.com/questions/tagged/regex Now, if I apply the regex below over it… (https?|ftp)://([^/\r\n]+)(/[^\r\n]*)? … I would get the following result: Match “http://stackoverflow.com/” Group 1: “http” Group 2: “stackoverflow.com” Group 3: “https://stackoverflow.com/” Match “https://stackoverflow.com/questions/tagged/regex” Group 1: “https” Group 2: “stackoverflow.com” Group 3: “https://stackoverflow.com/questions/tagged/regex” But … Read more

techhipbettruvabetnorabahisbahis forumu