Lines Matching refs:match
237 …$ct = preg_match_all($searchTarget, $gedrec, $match, PREG_SET_ORDER | PREG_OFFSET_CAPTUR…
244 $pos1 = $match[$num - 1][0][1];
304 if (preg_match("/^\\$(\w+)$/", $value, $match)) {
305 … if (isset($this->vars[$match[1]]['id']) && !isset($this->vars[$match[1]]['gedcom'])) {
306 $value = $this->vars[$match[1]]['id'];
705 if (preg_match('/\$(.+)/', $tag, $match)) {
706 if (isset($this->vars[$match[1]]['gedcom'])) {
707 $newgedrec = $this->vars[$match[1]]['gedcom'];
709 $tmp = Registry::gedcomRecordFactory()->make($match[1], $this->tree);
713 if (preg_match('/@(.+)/', $tag, $match)) {
715 if (preg_match("/\d $match[1] @([^@]+)@/", $tgedrec, $gmatch)) {
734 if (preg_match("/(\d+) (_?[A-Z0-9]+) (.*)/", $this->gedrec, $match)) {
735 $this->fact = $match[2];
736 $this->desc = trim($match[3]);
954 $match = [];
956 if (preg_match('/0 @(.+)@/', $this->gedrec, $match)) {
957 $id = $match[1];
960 if (preg_match('/\$(.+)/', $attrs['id'], $match)) {
961 if (isset($this->vars[$match[1]]['id'])) {
962 $id = $this->vars[$match[1]]['id'];
965 if (preg_match('/@(.+)/', $attrs['id'], $match)) {
967 if (preg_match("/\d $match[1] @([^@]+)@/", $this->gedrec, $gmatch)) {
1009 $match = [];
1010 if (preg_match('/0 @(.+)@/', $this->gedrec, $match)) {
1011 $id = $match[1];
1132 $count = preg_match_all("/$level $t(.*)/", $subrec, $match, PREG_SET_ORDER);
1278 if (preg_match('/^I18N::number\((.+)\)$/', $var, $match)) {
1279 $var = I18N::number((int) $match[1]);
1280 } elseif (preg_match('/^I18N::translate\(\'(.+)\'\)$/', $var, $match)) {
1281 $var = I18N::translate($match[1]);
1282 … } elseif (preg_match('/^I18N::translateContext\(\'(.+)\', *\'(.+)\'\)$/', $var, $match)) {
1283 $var = I18N::translateContext($match[1], $match[2]);
1316 $match = [];
1317 if (preg_match('/0 @(.+)@/', $this->gedrec, $match)) {
1318 $id = $match[1];
1324 if (preg_match('/\$(.+)/', $tag, $match)) {
1325 $tag = $this->vars[$match[1]]['id'];
1394 if (preg_match('/1 (\w+)(.*)/', $this->gedrec, $match)) {
1395 $this->fact = $match[1];
1404 $this->desc = trim($match[2]);
1461 $match = [];
1464 if (preg_match('/0 @(.+)@/', $this->gedrec, $match)) {
1465 $value = $match[1];
1473 } elseif (preg_match("/@(\w+)/", $value, $match)) {
1475 if (preg_match("/\d $match[1] (.+)/", $this->gedrec, $gmatch)) {
1479 if (preg_match("/\\$(\w+)/", $name, $match)) {
1480 $name = $this->vars["'" . $match[1] . "'"]['id'];
1482 $count = preg_match_all("/\\$(\w+)/", $value, $match, PREG_SET_ORDER);
1485 $t = $this->vars[$match[$i][1]]['id'];
1486 $value = preg_replace('/\$' . $match[$i][1] . '/', $t, $value, 1);
1489 if (preg_match('/^I18N::number\((.+)\)$/', $value, $match)) {
1490 $value = I18N::number((int) $match[1]);
1491 } elseif (preg_match('/^I18N::translate\(\'(.+)\'\)$/', $value, $match)) {
1492 $value = I18N::translate($match[1]);
1493 } elseif (preg_match('/^I18N::translateContext\(\'(.+)\', *\'(.+)\'\)$/', $value, $match)) {
1494 $value = I18N::translateContext($match[1], $match[2]);
1498 if (preg_match("/(\d+)\s*([-+*\/])\s*(\d+)/", $value, $match)) {
1539 $match = [];
1540 $count = preg_match_all("/@([\w:.]+)/", $condition, $match, PREG_SET_ORDER);
1543 $id = $match[$i][1];
1546 if (preg_match('/0 @(.+)@/', $this->gedrec, $match)) {
1547 $value = "'" . $match[1] . "'";
1608 if (preg_match('/[0-9] (.+) @(.+)@/', $this->gedrec, $match)) {
1609 $id = $match[2];
1693 if (preg_match('/0 @(.+)@/', $this->gedrec, $match)) {
1694 $id = $match[1];
1763 $match = [];
1764 if (preg_match("/\d OBJE @(.+)@/", $this->gedrec, $match)) {
1765 $mediaobject = Registry::mediaFactory()->make($match[1], $this->tree);
1877 $match = [];
1880 if (preg_match("/\\$(\w+)/", $sortby, $match)) {
1881 $sortby = $this->vars[$match[1]]['id'];
1917 if (preg_match('/^(\w+):DATE (LTE|GTE) (.+)$/', $value, $match)) {
1924 $query->where($attr . '.d_fact', '=', $match[1]);
1926 $date = new Date($match[3]);
1928 if ($match[2] === 'LTE') {
1936 } elseif (preg_match('/^NAME CONTAINS (.+)$/', $value, $match)) {
1943 $names = explode(' ', $match[1]);
1950 } elseif (preg_match('/^LIKE \/(.+)\/$/', $value, $match)) {
1952 $match[1] = str_replace('\n', "\n", $match[1]);
1954 $query->where('i_gedcom', 'LIKE', $match[1]);
1958 } elseif (preg_match('/^(?:\w*):PLAC CONTAINS (.+)$/', $value, $match)) {
1971 … ->where($attr . 'b.p_place', 'LIKE', '%' . addcslashes($match[1], '\\%_') . '%');
1972 } elseif (preg_match('/^(\w*):(\w+) CONTAINS (.+)$/', $value, $match)) {
1974 … $match[3] = strtr($match[3], ['\\' => '\\\\', '%' => '\\%', '_' => '\\_', ' ' => '%']);
1975 … $like = "%\n1 " . $match[1] . "%\n2 " . $match[2] . '%' . $match[3] . '%';
1977 } elseif (preg_match('/^(\w+) CONTAINS (.*)$/', $value, $match)) {
1979 … $match[2] = strtr($match[2], ['\\' => '\\\\', '%' => '\\%', '_' => '\\_', ' ' => '%']);
1980 $like = "%\n1 " . $match[1] . '%' . $match[2] . '%';
2003 if (preg_match('/^(\w+):DATE (LTE|GTE) (.+)$/', $value, $match)) {
2010 $query->where($attr . '.d_fact', '=', $match[1]);
2012 $date = new Date($match[3]);
2014 if ($match[2] === 'LTE') {
2022 } elseif (preg_match('/^LIKE \/(.+)\/$/', $value, $match)) {
2024 $match[1] = str_replace('\n', "\n", $match[1]);
2026 $query->where('f_gedcom', 'LIKE', $match[1]);
2030 } elseif (preg_match('/^NAME CONTAINS (.*)$/', $value, $match)) {
2031 if ($sortby === 'NAME' || $match[1] !== '') {
2042 if ($match[1] != '') {
2043 $names = explode(' ', $match[1]);
2052 } elseif (preg_match('/^(?:\w*):PLAC CONTAINS (.+)$/', $value, $match)) {
2065 … ->where($attr . 'b.p_place', 'LIKE', '%' . addcslashes($match[1], '\\%_') . '%');
2066 } elseif (preg_match('/^(\w*):(\w+) CONTAINS (.+)$/', $value, $match)) {
2068 … $match[3] = strtr($match[3], ['\\' => '\\\\', '%' => '\\%', '_' => '\\_', ' ' => '%']);
2069 … $like = "%\n1 " . $match[1] . "%\n2 " . $match[2] . '%' . $match[3] . '%';
2071 } elseif (preg_match('/^(\w+) CONTAINS (.+)$/', $value, $match)) {
2073 … $match[2] = strtr($match[2], ['\\' => '\\\\', '%' => '\\%', '_' => '\\_', ' ' => '%']);
2074 $like = "%\n1 " . $match[1] . '%' . $match[2] . '%';
2097 if (preg_match("/@(\w+)/", $condition, $match)) {
2098 $id = $match[1];
2101 if (preg_match('/0 @(.+)@/', $this->gedrec, $match)) {
2102 $value = "'" . $match[1] . "'";
2109 if (preg_match("/\d $id (.+)/", $this->gedrec, $match)) {
2110 $value = "'" . str_replace('@', '', trim($match[1])) . "'";
2116 if (preg_match("/([A-Z:]+)\s*([^\s]+)\s*(.+)/", $condition, $match)) {
2117 $tag = trim($match[1]);
2118 $expr = trim($match[2]);
2119 $val = trim($match[3]);
2120 if (preg_match("/\\$(\w+)/", $val, $match)) {
2121 $val = $this->vars[$match[1]]['id'];
2392 $match = [];
2393 if (preg_match("/\\$(\w+)/", $sortby, $match)) {
2394 $sortby = $this->vars[$match[1]]['id'];
2405 if (preg_match("/\\$(\w+)/", $group, $match)) {
2406 $group = $this->vars[$match[1]]['id'];
2412 if (preg_match("/\\$(\w+)/", $id, $match)) {
2413 $id = $this->vars[$match[1]]['id'];
2789 $ct = preg_match("/$level $t(.*)/", $subrec, $match);
2791 $ct = preg_match("/$level @.+@ (.+)/", $subrec, $match);
2794 $ct = preg_match("/@ $t (.+)/", $subrec, $match);
2797 $value = trim($match[1]);
2798 if ($t === 'NOTE' && preg_match('/^@(.+)@$/', $value, $match)) {
2799 $note = Registry::noteFactory()->make($match[1], $this->tree);
2804 $value = $match[1];