Editing 1638: Backslashes
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 16: | Line 16: | ||
This doubling of backslashes happens in most programming and scripting languages, but also in other syntactic constructs such as {{w|Regular expression|regular expressions}}. So, when several of these languages are used in conjunction, backslashes pile up exponentially (each layer has to double the number of slashes). See example of a backslash explosion and alternatives to avoid this [[#Backslash explosion and alternatives|below]]. | This doubling of backslashes happens in most programming and scripting languages, but also in other syntactic constructs such as {{w|Regular expression|regular expressions}}. So, when several of these languages are used in conjunction, backslashes pile up exponentially (each layer has to double the number of slashes). See example of a backslash explosion and alternatives to avoid this [[#Backslash explosion and alternatives|below]]. | ||
β | This kind of backslash explosion is known as {{w|Leaning toothpick syndrome}}, and can happen in | + | This kind of backslash explosion is known as {{w|Leaning toothpick syndrome}}, and can happen in many situations. Below is an explanation of all the [[#Entries in the list|entries in the comic]]. |
The backslash explosion in the title text is about a {{w|Bash (Unix shell)|bash}} command (which uses the backslash to escape arguments) invoking the {{w|grep}} utility which searches for text following a pattern specified by means of a regular expression (which also uses the backslash to escape special characters). This leads to 3 backslashes in a row in the command, which could easily become 7 backslashes in a row if the text being searched for also contains a backslash. | The backslash explosion in the title text is about a {{w|Bash (Unix shell)|bash}} command (which uses the backslash to escape arguments) invoking the {{w|grep}} utility which searches for text following a pattern specified by means of a regular expression (which also uses the backslash to escape special characters). This leads to 3 backslashes in a row in the command, which could easily become 7 backslashes in a row if the text being searched for also contains a backslash. |