Solved

C# String Split

Posted on 2013-12-18
2
533 Views
Last Modified: 2013-12-18
Hello,

C# - I need to split the below string:

Kwynce Brookins (001091)
Tre Brookins (001089)
Kent Hood (001267)

and get the output shown below :

001091,001089,001267

the input values are in Ilist and I am looping them...

Any idea?

Thanks
0
Comment
Question by:mani_sai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
Minh Võ Công earned 500 total points
ID: 39726817
public string extracString(string intStr)
    {
        char[] delimiterChars = { '(', ')'};
        string[] words = intStr.Split(delimiterChars);
        return words[1];
    }
now you call  extracString("Kwynce Brookins (001091)") return 001091 and so on
0
 
LVL 8

Author Comment

by:mani_sai
ID: 39727005
Thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question