Solved

escape sequences

Posted on 2004-09-08
6
1,318 Views
Last Modified: 2012-08-13
Where can I find a list of escape characters that work in C#:

"\n"    RETURN
"\t"     TAB

etc., etc.

???
0
Comment
Question by:knowlton
  • 3
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
Timbo87 earned 300 total points
ID: 12012067
Here's a good list.
http://www.wilsonmar.com/1eschars.htm
It's not C# specific, but C# uses the same escape characters.
0
 
LVL 10

Expert Comment

by:eternal_21
ID: 12012108
0
 
LVL 1

Expert Comment

by:elfraga
ID: 12012131
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 1

Assisted Solution

by:elfraga
elfraga earned 100 total points
ID: 12012136
here they are:

Escaped character Description
ordinary characters Characters other than . $ ^ { [ ( | ) * + ? \ match themselves.
\a Matches a bell (alarm) \u0007.
\b Matches a backspace \u0008 if in a [] character class; otherwise, see the note following this table.
\t Matches a tab \u0009.
\r Matches a carriage return \u000D.
\v Matches a vertical tab \u000B.
\f Matches a form feed \u000C.
\n Matches a new line \u000A.
\e Matches an escape \u001B.
\040 Matches an ASCII character as octal (up to three digits); numbers with no leading zero are backreferences if they have only one digit or if they correspond to a capturing group number. (For more information, see Backreferences.) For example, the character \040 represents a space.
\x20 Matches an ASCII character using hexadecimal representation (exactly two digits).
\cC Matches an ASCII control character; for example, \cC is control-C.
\u0020 Matches a Unicode character using hexadecimal representation (exactly four digits).
\ When followed by a character that is not recognized as an escaped character, matches that character. For example, \* is the same as \x2A.
0
 
LVL 10

Assisted Solution

by:eternal_21
eternal_21 earned 100 total points
ID: 12012233
Sorry Tom, my previous posted link was for Regular Expressions in .NET...  Here is the OFFICIAL defination (i.e.: from the ECMA C# Language Specification):

http://msdn.microsoft.com/vcsharp/team/language/default.aspx
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf (See 9.4.4.4 Character Literals, Page 75)

The Simple escape sequences:

  \'  Single quote (\x 0027)
  \"  Double quote  (\x0022)
  \\  Backslash  (\x005C)
  \0  Null  (\x0000)
  \a  Alert  (\x0007)
  \b  Backspace  (\x0008)
  \f  Form feed  (\x000C)
  \n  New line  (\x000A)
  \r  Carriage return  (\x000D)
  \t  Horizontal tab (\x0009)
  \v  Vertical tab (\x000B)

The Unicode escape sequences:

  \u  hex-digit hex-digit hex-digit hex-digit
  \U  hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit

The Hexidecimal escape sequence:

  \x  hex-digit [hex-digit] [hex-digit] [hex-digit]
0
 
LVL 10

Expert Comment

by:eternal_21
ID: 12012236
Uh.. make that "definition"... when's EE going to get a spell-checker anyway? :)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now