[core][js] remove char ~ in RegExp