Global Information Lookup Global Information

Leaning toothpick syndrome information


In computer programming, leaning toothpick syndrome (LTS) is the situation in which a quoted expression becomes unreadable because it contains a large number of escape characters, usually backslashes ("\"), to avoid delimiter collision.[1][2]

The official Perl documentation[3] introduced the term to wider usage; there, the phrase is used to describe regular expressions that match Unix-style paths, in which the elements are separated by slashes /. The slash is also used as the default regular expression delimiter, so to be used literally in the expression, it must be escaped with a backslash \, leading to frequent escaped slashes represented as \/. If doubled, as in URLs, this yields \/\/ for an escaped //. A similar phenomenon occurs for DOS/Windows paths, where the backslash is used as a path separator, requiring a doubled backslash \\ – this can then be re-escaped for a regular expression inside an escaped string, requiring \\\\ to match a single backslash. In extreme cases, such as a regular expression in an escaped string, matching a Uniform Naming Convention path (which begins \\) requires 8 backslashes \\\\\\\\ due to 2 backslashes each being double-escaped.

LTS appears in many programming languages and in many situations, including in patterns that match Uniform Resource Identifiers (URIs) and in programs that output quoted text. Many quines fall into the latter category.

  1. ^ Andy Lester, Richard Foley (2005). Pro Perl Debugging. Andy Lester, Richard Foley. p. 176. ISBN 1-59059-454-1.
  2. ^ Daniel Goldman (February 2013). Definitive Guide to sed. EHDP Press. ISBN 978-1-939824-00-4.
  3. ^ perlop at perldoc.perl.org.

and 9 Related for: Leaning toothpick syndrome information

Request time (Page generated in 0.8005 seconds.)

Leaning toothpick syndrome

Last Update:

In computer programming, leaning toothpick syndrome (LTS) is the situation in which a quoted expression becomes unreadable because it contains a large...

Word Count : 945

Escape character

Last Update:

for the locale of the keyboard layout. Escape sequences in C Leaning toothpick syndrome Nested quotation Stropping (syntax) – in some conventions a leading...

Word Count : 1503

Sed

Last Update:

occur in the pattern or replacement; this is useful to avoid "leaning toothpick syndrome". The substitution command, which originates in search-and-replace...

Word Count : 2612

Regular expression

Last Update:

often than their literal meaning, so to avoid "backslash-osis" or leaning toothpick syndrome, they have a metacharacter escape to a literal mode; starting...

Word Count : 8915

Delimiter

Last Update:

littered with numerous escape characters, a problem referred to as leaning toothpick syndrome (due to use of \ to escape / in Perl regular expressions, leading...

Word Count : 2389

Nested quotation

Last Update:

quotation depth. Embedded metalanguage Story within a story Play within a play Leaning toothpick syndrome "JavaScript eval() Method". "JavaScript Strings"....

Word Count : 537

Magic quotes

Last Update:

reducing the need to escape data before constructing the queries. Leaning toothpick syndrome "Magic Quotes". PHP Manual. PHP.net. Retrieved 2014-01-17. "PHP:Why...

Word Count : 1032

LTS

Last Update:

da teater svizzer, an encyclopedia of theater in Switzerland Leaning toothpick syndrome, a computer-programming idiom that describes a surfeit of backslashes...

Word Count : 160

String literal

Last Update:

as a path separator. The profusion of backslashes is known as leaning toothpick syndrome, and can be reduced by using raw strings. Compare escaped and...

Word Count : 5639

PDF Search Engine © AllGlobal.net