?
Solved

C# String Split

Posted on 2013-12-18
2
Medium Priority
?
534 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 2000 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 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