change detection of completions

change the regex that detects whether completions are provided
to allow javascript, lua and erlang scripts to support completions