刚接触C#,对正则表达式不熟,谁能帮我看看这个要怎么做?我有如下字符串,怎么写正则表达式获取到我想要的值str3有如下3种形式:
str3 = "http://10.92.32.20/sdd1/gitweb-sdd1-all/?p=mtk6572/kernel.git;a=commit;h=e7c4dd13ad4f481f0d45300e72fadfcb03a2cbb1";
str3 = "http://10.92.32.20/gitweb.cgi?p=sdd1/mtk6572/kernel.git;a=commit;h=322df00e744dbf90006da4da563f8b5ef4d323d4"; str3 = "http://10.92.32.20/sdd1/gitweb-mtk6580/?p=vendor.git;a=commit;h=ed61c57a95a521699d6b00055ee64c5a6db416c0";
我想得到:
1.这一长串本身;
2.p=和.git之间的;
3.h=之后的那串值;
请高手指点,万分感谢
(?<=\").*(?=\")
(?<=p\=).*(?=\.git)
(?<=h\=)[a-f0-9]+