lucy24 - 3:29 am on May 13, 2013 (gmt 0)
Opening and closing anchors are basically what the name says.
foobar = text contains "foobar"
^foobar = text begins "foobar"
foobar$ = text ends "foobar"
^foobar$ = text begins and ends (i.e. is exactly) "foobar"
In the particular case of testing for hosts, leaving off the closing anchor means "there may or may not be a port number here". It's generally only for insurance, since the chances are very small that someone will come in asking for any specific port number, let alone the wrong one. Opening anchors on the other hand are essential because that's where you determine whether the host does or does not include "www." or perhaps a subdomain name.
Anchors aren't specific to htaccess. It's how Regular Expressions work everywhere. The most important .htaccess-specific feature of Regular Expressions is that you have to escape literal spaces, even inside grouping brackets, because a space has syntactic meaning almost everywhere in Apache. Sometimes you also have to escape / slashes, but luckily not in mod_rewrite or mod_alias.