JS: regex completion.