Dan Schimo
asked on
Regex get 8 digit alphanumeric from a string c#
Hello Experts,
I am trying to get the 8 digit Alphanumeric value from the below string. Please help..
I am trying to get the 8 digit Alphanumeric value from the below string. Please help..
rak45551is string I am interested in.
CN=James Kera rak45551,OU=SOA,OU=End-Users,OU=KAL-Users,DC=KAL,DC=British,DC=com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi Dan;
Try placing this line of code for the same in your code.
Try placing this line of code for the same in your code.
Match match = Regex.Match(input, @"CN=.*([a-zA-Z1-9]{8}),", RegexOptions.IgnoreCase);
ASKER
Thank you Fernanado. I used Rgonzo1971 earlier and it worked. I was incorreclty calling an expression as string.
Very good.
ASKER
- Dan
Open in new window