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 /.
For example, the following three examples are equivalent to the expression given above: Or this common translation to convert backslashes to forward slashes: may be easier to understand when written like this: A Perl program to print an HTML link tag, where the URL and link text are stored in variables $url and $text respectively, might look like this.
Raw strings may also span multiple lines, as in this example, where the strings s and t are equivalent: Python has a similar construct using r: One can also use them together with triple quotes: R has a similar construct using r or R with various bracket deliminators ((, [, {): For raw strings that contain ( instances For additional flexibility, a number of dashes can be placed between the opening quote and the opening delimiter, as long as the same number of dashes appear between the closing delimiter and the closing quote.
Scala allows usage of triple quotes in order to prevent escaping confusion: The triple quotes also allow for multiline strings, as shown here: Sed regular expressions, particularly those using the "s" operator, are much similar to Perl (sed is a predecessor to Perl).