我想提取此( “5013a27a-3e44d69d-4120-080027a10080” 而异)匹配句获得一个正则表达式中的字符串
/vmfs/volumes/5013a27a-3e44d69d-4120-080027a10080
出来的(这是一个字符串):
name datastore1
url /vmfs/volumes/5013a27a-3e44d69d-4120-080027a10080
capacity 123480309760
freeSpace 96355745792
accessible 1
type VMFS
multipleHostAccess <unset>
所以我也做了以下内容,但它不工作:
Regex regex = new Regex(@"[/][A-Za-z0-9/-][/] [ ]");
MatchCollection match = regex.Matches(input);
我在哪里出了错?
几乎无处不在:)该正则表达式将匹配'/ p /',而不是其他的。 – Ryan 2012-07-28 14:03:31
[Espresso](http://www.ultrapico.com/Expresso.htm)有人吗? :) – Darek 2012-07-28 14:34:31