I 'm having a link like this
href="abc.com/Details/gotoTicket?ticketID=EO8"
I want get an ID beetwen gotoTicket?ticketID=
and "
.
The result of link above I want is EO8
How can I do that with Regex ?
I 'm having a link like this
href="abc.com/Details/gotoTicket?ticketID=EO8"
I want get an ID beetwen gotoTicket?ticketID=
and "
.
The result of link above I want is EO8
How can I do that with Regex ?
You don't need regex for that. You can use the HttpUtility
to get your query string, e.g.
var href = new Uri("http://example.org/Details/gotoTicket?ticketID=EO8");
string ticketId = HttpUtility.ParseQueryString(href.Query).Get("ticketID");
Just make sure that your href
(URL) starts with a scheme.