Javascript Search String For Substring Mysql Interview