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, 2022 in C# by krishna
• 2,820 points
341 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, 2022 in C# by krishna
• 2,820 points
714 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, 2022 in C# by krishna
• 2,820 points
1,743 views
0 votes
0 answers

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

The following is my classes class MyDate { ...READ MORE

Sep 26, 2022 in C# by krishna
• 2,820 points
450 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, 2022 in C# by rajiv
• 1,620 points
1,298 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, 2022 in C# by pranav
• 2,590 points
2,457 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, 2022 in C# by krishna
• 2,820 points
427 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,250 points
2,820 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
947 views
0 votes
1 answer

How to split a string in Java

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

answered Feb 9, 2022 in Java by Rahul
• 9,680 points

edited Jul 6, 2023 by Khan Sarfaraz 741 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, 2022 in PHP by Kichu
• 19,040 points
719 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP