Create Regex From String Javascript Methods