scripts/karma: improve regex