Solved

Need help with a string operation.

Posted on 2016-08-19
2
44 Views
Last Modified: 2016-08-19
Hi Experts,

I have string "PL0445796AA03ZHE_Q10_S35852592B". I want to strip it out to three different strings.
S1 ="PL0445796AA03ZHE"
S2 = "Q10"
S3 = "S35852592B"

The length of the strings might me different. But there will be always 2 underscores.

Thanks in advance.
0
Comment
Question by:RadhaKrishnaKiJaya
[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 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 41762785
string s = "PL0445796AA03ZHE_Q10_S35852592B";
            string[] sRes = s.Split('_');

sRes contains the three strings you want in an array
0
 

Author Closing Comment

by:RadhaKrishnaKiJaya
ID: 41762819
Thank you very much.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

738 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