tweaked query regex