Added initial shell implementation.  

Probably needs better error handling.  Also, implementation isn't very elegant.
@bsoetaer 
0 should refer to the entire match.  1 should refer to the first explicit group match.