> * Regexp ^ and $ work match more than just start and end of string. For
> example, /^abc$/ does not match only "abc" but also "rm -rf /*\nabc"

Are you aware of the \A, and \Z regexp matchers - matches the start
and end of a string while ^, and $ match before and after newline.

-- 
Anurag Priyam
http://about.me/yeban/