It's fairly standard practice online when one makes a typo to mark a correction with an asterisk. For example:

John says: so im going to the cinmena tomorrow u wanna come? John says: cinema*

This strategy (supposedly necessary even amidst a sentence full of grammatically dubious abbreviations) can be taken one step further. If you find yourself in a channel named #C++, #PHP and such like on IRC, you may well see people writing regular expressions to "fix" their previous line. For example:

<john361> and do send out emails using a php function? <john361> s/do/to

The second line is a regular expression substitution. The 's' means substitution, the 'do' is the text to change and the 'to' is the text to change it to. So anyone reading john361's messages should apply the "fix" in their minds and read the original text as:

<john361> and to send out emails using a php function?

Unfortunately, this is incorrect. I have yet to figure out why so many people are doing this at the moment, but there's an epidemic of omitting terminating regular expression delimiters.

So I'm going to say this once, and once only:

  • It's "s/do/to/".
  • Note the trailing "/".
  • It is part of the expression just like the "s/" at the beginning and the "/" in the middle.
  • Malformed substitution regexes are NOT cool!

Thanks for reading.