Category Archives: regex

Vim: Search and Replace, Insert new line

Vim has some really useful commands, especially search and replace ones. Unfortunately I'm always forgetting the finer details of how to use them so here's an example:
PLAIN TEXT
CODE:

:%s/$/\rthis is a new line

To break down whats happening above:

: switches Vim into command mode
% means we're going to apply this command to every line in our [...]

Email Interaction with Web Applications (using PHP, Postfix and Regular Expressions)

One of the popular facilities on phuser.com is the ability to create polls. Once a poll has been created it can be sent to people by SMS or Email. The recipients can reply with their choice of answer and a optional comment using SMS, Email or phuser web interface, lovely!
Handling of emails replies has easy [...]