从AD查询中过滤结果并仅显示证书项.我如何“从右到左"显示结果? [英] filter the results from an AD query and only show certian items..and how can i display the results "right to left"?

查看:68
本文介绍了从AD查询中过滤结果并仅显示证书项.我如何“从右到左"显示结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好,这是一个好问题...我正在从AD查询中提取信息...有一个长字符串,看起来像这样.

ok here is a good question...Im pulling information from an AD query...there is a long string that looks like this.

"CN = Exxxxxx,OU = CA,OU =区域,DC = blabla,DC = ds,DC =域,DC = com"

"CN=Exxxxxx,OU=CA,OU=region,DC=blabla,DC=ds,DC=domain,DC=com"

1 ...我该如何从右向左读取此信息...以及 我怎么能用这个字符串做两件事.

1...how can i read this info from right to left...and how can i do 2 things with this string.

1.  display only the domain..with no DC=domain...just domain.

2. 我如何从右到左读取它.

2. how can i read it right to left.

" span> span>

3.how can i take  out symbols and replace them with '\' for example  "domain\ds\blabla\canla\ca"?

i hope that this request is not 2 crazy...

谢谢 大家提前...度过一个愉快的夜晚!

thanks guys in advance...and have a great evening!!

 

推荐答案

string myString ="CN = Exxxxxx,OU = CA,OU = region,DC = blabla,DC = ds,DC =域,DC = com"

string myString = "CN=Exxxxxx,OU=CA,OU=region,DC=blabla,DC=ds,DC=domain,DC=com"

string [] myArray = myString.Split(',');

string[] myArray = myString.Split(',');

这为您提供了一个数组.我认为从那时起,您可以做任何您想做的事情.万一出了点麻烦,请务必指出.或者,如果您想对上述问题有完整的答案,请也指出来.

That gives you an array. I think from there on, you can do whatever you wish for. In case, something troubles you after that, please do point it out. Or if you want a complete answer to your above questions, please do point it out too.


这篇关于从AD查询中过滤结果并仅显示证书项.我如何“从右到左"显示结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆