Make regex more forgiving for assignment

Closes #1110 and #1120
Fix for assignments ending in semicolons
Merge pull request #1225 from visionmedia/fix/assignment

Make regex more forgiving for assignment