#!usr/bin/env js var url = readline(); var get = ""; if (url.match(/[^\].+[^\]+\s/){ get = RegExp.$1; } print(get);