add query and phpRegexp method