Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 723677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:08:08+00:00 2026-05-14T06:08:08+00:00

I have a string in following format TestString 1 <^> TestString 2 <^> Test

  • 0

I have a string in following format

“TestString 1 <^> TestString 2 <^> Test String3

Which i want to split by “<^>” string.

Using following statement it gives the output i want

"TestString 1 <^> TestString 2 <^> Test String3"
 .Split("<^>".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)

But if my string contains “<” , “>” or “^” anywhere in the text then above split statement will consider that as well

Any idea how to split only for “<^>” string ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:08:08+00:00Added an answer on May 14, 2026 at 6:08 am

    By using ToCharArray you are saying “split on any of these characters”; to split on the sequence "<^>" you must use the overload that accepts a string[]:

    string[] parts = yourValue.Split(new string[]{"<^>"}, StringSplitOptions.None);
    

    Or in C# 3:

    string[] parts = yourValue.Split(new[]{"<^>"}, StringSplitOptions.None);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a String which has the following format: 2011-08-19T00:00:00 and I want now
I have a string which is in the following format, When there is a
I have a string in the in the following format ,value,value2,3,(this is, a test),
i have a string which has the following format (3,1,Mayer,Jack). I need all 4
I have string in the following format. Option1:Option2:Option3:Option4 I want to get these items
I have a String with the following format: january_2005 (MMMMMMM_yyyy) and i want to
I have a string in the following format. 07/06/2011 5:06 mm/dd/yyyy hh:mm am using
I want to create a pattern for the following format of string. I have
I have string with following format: $date = 2012-07-22 17:48:24; I want to get
I want to have a string in the following format FAG001 FAG002 FAG003 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.