the $ Matches the end of a string and the /iS the i case-insensitively and S acts like $strip
if you want to learn them read up on a few tutts you can start with this one http://www.hawkee.com/phpBB2/viewtopic.php?t=9764