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

  • SEARCH
  • Home
  • 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 6556719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:58:50+00:00 2026-05-25T12:58:50+00:00

keep the original string format after modified? $source1= 03aaa\r\n 04bbb\r\n 05ccc\r\n 04eee\r\n 05fff\r\n 04ggg\r\n

  • 0

keep the original string format after modified?

$source1= "03aaa\r\n
04bbb\r\n
05ccc\r\n
04eee\r\n
05fff\r\n
04ggg\r\n
05hhh\r\n
08eee\r\n"

Can be

$source2= "03aaa04bbb05ccc04eee05fff04ggg05hhh08eee"

I want to keep the original format(if there are linebreak keep it like origin) after I made modified(added 07) the $source .

if input is like source1 format:

ouput:

$source1= "03aaa\r\n
  04bbb\r\n
  05ccc\r\n
  04eee\r\n
  05fff\r\n
  07fff\r\n
  04ggg\r\n
  05hhh\r\n
  07hhh\r\n
  08eee\r\n"

if input is like source2 format:

$source2= "03aaa04bbb05ccc07fff04eee05fff07fff04ggg05hhh007fff8eee"

How Can I got the expected result and keep the format like the origin?

Anyone could help me please?

thanks

  • 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-25T12:58:51+00:00Added an answer on May 25, 2026 at 12:58 pm

    Use single quotes to avoid translating special characters and variables.

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

Sidebar

Related Questions

I cannot keep the original string in memory because it is too big. var
BACKGROUND I have a script to upload an image. One to keep the original
Keep getting this error after inserting a subdatasheet into a query and trying to
I have some problem with replace string in Ruby. My Original string : What
The following code tries to copy an object and keep the original type. Unfortunately
Keep in mind that I'm not looking for a list of current browsers to
I keep getting tasks that are above my skill level. How can I address this without coming accross as grossly incompetent?
I keep running across this loading image http://georgia.ubuntuforums.com/images/misc/lightbox_progress.gif which seems to have entered into
I keep hearing from associates about grid computing which, from what I can gather,
I keep hearing that div tags should be used for layout purposes and not

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.