How can I split a string with a string delimiter

0 votes

Suppose this is my string

My name is Marco and I'm from Italy

I want to split this with delimiter is Marco and, so I should get an array with

  • My name at [0] and
  • I'm from Italy at [1].
How can I do this in C#?
Jun 11 in C# by krishna
• 2,540 points
14 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In C#

0 votes
1 answer

How do I turn a C# object into a JSON string in .NET

Newtonsoft.json can be used to accomplish this. ...READ MORE

answered Jun 13 in C# by krishna
• 2,540 points
24 views
0 votes
1 answer

How to initialize a list of strings (List<string>) with many string values

Simply remove the () at the end. List<string> ...READ MORE

answered Jun 13 in C# by krishna
• 2,540 points
21 views
0 votes
1 answer

How can I compile and run c# program without using visual studio

If you have.NET Framework v4 installed, then C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe ...READ MORE

answered Jun 9 in C# by rajiv
• 1,620 points
30 views
0 votes
1 answer

How do I specify the exit code of a console application in .NET

Simply put, you can return the exit ...READ MORE

answered Jun 11 in C# by pranav
• 2,580 points
52 views
0 votes
1 answer

Switch case: can I use a range instead of a one number

To categorise your switch circumstances, I would ...READ MORE

answered Jun 13 in C# by krishna
• 2,540 points
13 views
0 votes
0 answers

How to add a gridview to a C# winforms project with a list of objects as the datasource

In Visual Studio 2015 community, I'm creating ...READ MORE

Jun 11 in C# by krishna
• 2,540 points
12 views
0 votes
1 answer

Validating String against USPS state abbreviations

This is how I'd do it: private static ...READ MORE

answered Nov 10, 2018 in Others by DataKing99
• 8,240 points
1,263 views
0 votes
1 answer

splitting and concatenating a string

You can try the following code in ...READ MORE

answered Apr 17, 2019 in Python by SDeb
• 13,300 points
251 views
0 votes
1 answer

How to split a string in Java

By using the appropriate method, this can ...READ MORE

answered Feb 9 in Java by Rahul
• 9,000 points
44 views
0 votes
0 answers

Split string into 2 pieces by length using PHP

I want to split my long string ...READ MORE

Jun 1 in PHP by Kichu
• 19,040 points
27 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP