Fixing regex bug reported @avlidienbrunn