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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:31:24+00:00 2026-05-26T13:31:24+00:00

Ive parsed a text file into a List<string> object and the test file contains

  • 0

Ive parsed a text file into a List<string> object and the test file contains \n and \t, however once I output the strings to console they appear as “\n” and “\t” rather than a new line and a tab.

At the moment i’m using myList[i].Replace(@"\n", "\n").Replace(@"\t", "\t") but this seems a little cumbersome, especially if more escape sequences need to be added in the future.

Is their any way to un-escape the escaped sequences? Something like string.UnEscape would be just to perfect.

  • 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-26T13:31:25+00:00Added an answer on May 26, 2026 at 1:31 pm

    I’m not sure if this will do exactly what you’re after but there is an Unescape method in the RegEx namespace.

    string result = Regex.Unescape(myList[i]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A lot of programs log things into a text file in a format something
So I've developed a system that saves database insert/update commands into a text file
So I've written some code in Ruby to split a text file up into
I'm parsing a PDF file and extracting some of the text, and I've run
Ive been writing a simple jquery function that turns a div with a list
Ok so I have a text file that will change regularly that I need
Here is an example of a parsed xml file I'm working with that tabs
I have a big string (let's call it a CSV file, though it isn't
I have a text file which is formatted with titles, location of images, and
I've got a text file that looks like this: { Id = 1, ParentId

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.