Regex to insert text before and after a line

A common thing I need to do is insert text before and after a number of lines in a text editor. For example, I might have the following text:
test1
test2
test3
test4
test5

Which I want to change to something like this:
before_test1_after
before_test2_after
before_test3_after
before_test4_after
before_test5_after

So I’ve added the text before_ at the start of each line and the text _after at the end [...]

July 25, 2010 | In General | No Comments

A Better Joomla Administration Template

The Joomla Administration pages, have, well, always been a bit poor. Not any more! You can make them look at lot better with the free AdminPraise Lite template available from JoomlaPraise. This doesn’t just make your administration pages look better, it actually makes them easier to work with by organising things better. Definitely worth trying [...]

July 12, 2010 | In General | No Comments

Allow PHP code to execute in a HTML file

By default on Apache web servers, PHP code will not execute in a file that does not have a .php (or similar) extension. So even though you can embed PHP into a HTML file, it won’t execute when the file extension is .html, .htm etc.
To change this, you can add a .htaccess file. Here’s some [...]

July 1, 2010 | In General | No Comments