troubleshooting Question

Split string to get certain characters

Avatar of DeveloperUser
DeveloperUserFlag for United Kingdom of Great Britain and Northern Ireland asked on
.NET ProgrammingC#ASP.NET
7 Comments3 Solutions489 ViewsLast Modified:

I have a varible string called: strDescription.

Here are a couple of examples of what it could contain:

strDescription = 12_100_2.4_BQ___TGV CLAD__PEFC

strDescription = 12_2440_12220_WI_FE_Hwd ply__WBP_FSC

I would simply like to get the first 2 letters after the third underscore.. In these cases it would be:

1st example =  'BQ'
2nd example = 'WI'

If you can help that would be great.


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 3 Answers and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros