Regex to select span ID
Kindly help me know the regex to select only span id for a given span markup. I'm trying to do it from inside c#. My input is like . And I want as an output only >> id="x8x8d9s8" <<
Currently I'm trying to 开发者_开发技巧achieve above as follows but no luck, unfortunately ...
string innerPattern = @"(id=)\""|"|(.)*\""|"|";
Please note its only the start span tag, I do not want to include end span tag i.e.
Any help would be greatly appreciated.
Thanks in advance.
What about this :
(id=".*?")
In C# :
@"(id="".*?"")"
Tried on this regex tester with tagada <span id="test" tagada />
精彩评论