I want to use same variables in regexp pattern.
string Pattern = "<li.*?class=\".*?item\".*?>.*?<a.*?href=\"(?<link>.*?)\">(?<a1>.*?)>(?<title>.*?)(a1)";
e.g if there is "<span>" in a1 ,after the title variable the "<span>"should become.
If you need to reference a previously captured group
Use
\index//where index is the group number
OR
\k<name>//where name is the name of the group
So in your case it should be \k<a1>
Also regex is not used for parsing HTML
Use htmlagilitypack