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 7084413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:17:54+00:00 2026-05-28T07:17:54+00:00

i was programming some code in which i have to enter text in a

  • 0

i was programming some code in which i have to enter text in a particular format only.
i.e.

2
10 5 kdsfj ejkd kjdf
7 8 sdkj dsjklf ckjsd dksj

and so on

but i have to enter the data form a text file having the whole as a string as

2 10 5 kdsfj ejkd kjdf7 8 sdkj dsjklf ckjsd dksj6 12 kjd ekjr fkjdr fdkj

but i want to suppy the text as given above format.
Bold letters are saparable points.
i want a program so that it can add a newline after character or space followed by digit ?

How can i do that ?

  • 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-28T07:17:54+00:00Added an answer on May 28, 2026 at 7:17 am

    The answer is going to be some form of regex

    Regex.Replace(inputString, @"([A-Za-z])(\d)", "$1" + Environment.NewLine + "$2");
    

    Where input is your source line from the file, and the pattern matches you specific criteria. With the above replace you end up with:

    2 10 5 kdsfj ejkd kjdf
    7 8 sdkj dsjklf ckjsd dksj
    6 12 kjd ekjr fkjdr fdkj
    

    Your additional comments clarified the line breaks when joined to a previous character; although I am still not sure why 2 ends up on its own line?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using .Net 4.0. I have a some code which tries to open a connection
I have some Java code which I'm translating to Scala. The code consists of
I'm actually translating some C++ code (which I know very little about, and have
I have an idea for a hobby project which performs some code analysis and
I was running some dynamic programming code (trying to brute-force disprove the Collatz conjecture
I'm looking at some older Perl code on Perl Monks to figure out programming
I have about 4-5 years of background in programming some in C# and some
I' ve been doing some programming lately and faced an issue which i found
I have done some programming and I have used Mercurial for source control. I
I have the following code which takes a normal HTTP GET Request and returns

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.