Fixed regex to ensure '/' isn't captured.

Hi @dpnova,

Fixed up the bug discussed in the last PR. Not sure if it's perfect though, but it works.