开发者

VB.net Regex extract data from string

I am trying to extract data from a string using Regex in VB.net. This is my string

CN=firstname lastname/OU=orgunit/O=org;shortname

I am basically trying to retrieve

firstname lastname (together)
orgunit
org
shortname

can someo开发者_开发问答ne please help me.


Try this regexp:

^/CN=([^/]*)/OU=([^,]*),O=([^;]*);(.*)$

(first capture group is name, second is orgunit, third is org, fourth is shortname)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜