Extract Id from Twitch Clip URL
Extract Id from Twitch Clip URL How can I extract the Id of a Twitch Clip URL. Example: https://clips.twitch.tv/KindYummyCarrotPeteZaroll?some=1 I need only the Id part, for example: https://clips.twitch.tv/[ID]?v=1 https://clips.twitch.tv/[ID]?v=1 The Id in the top example is KindYummyCarrotPeteZaroll . Any query string if comes after should be ignored and not be part of the Id. KindYummyCarrotPeteZaroll I tried: MatchCollection matches = Regex.Matches(url, @"^(https://clips.twitch.tv/)(?:(?!http).)*?"); But I wasn't able to capture the Id in a group. I am using ASP.NET and C#. Try (?<=twitch.tv/)(w*)(?=?) – pkpkpk Jun 30 at 7:10 (?<=twitch.tv/)(w*)(?=?) 1 Answer 1 No need for Regex: string str = "https://clips.twitch.tv/KindYum...