Fixed query regex and Add exmpale code