fork download
  1. var re=/\w+[\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_|]/g;
  2. var str="(https://www.microsoft.com)";
  3. var res=re.exec(str);
  4. str=str.substring(res.index,re.lastIndex);
  5. re=/(((https?|ftp|file|http)?:\/\/)(www.?)?)|(www.)/g;
  6. res=re.exec(str);
  7. str="www."+str.substring(re.lastIndex);
  8. print(str);
Success #stdin #stdout 0.02s 4984KB
stdin
Standard input is empty
stdout
www.microsoft.com