Home
last modified time | relevance | path

Searched refs:preg_replace (Results 1 – 25 of 39) sorted by relevance

12

/webtrees/app/Services/
H A DGedcomImportService.php54 use function preg_replace; alias
85 $rec = preg_replace("/[\r\n]+/", "\n", $rec);
112 $date = preg_replace('/([A-Z])(\d)/', '$1 $2', $date);
113 $date = preg_replace('/(\d)([A-Z])/', '$1 $2', $date);
115 $date = preg_replace('/@#[^@]+@/', ' $0 ', $date);
117 $date = preg_replace('/(\w\w)\./', '$1', $date);
124 $date = preg_replace('/^ EITHER (.+) OR (.+)/', ' BET $1 AND $2', $date);
126 $date = preg_replace('/^(.* BET .+) - (.+)/', '$1 AND $2', $date);
127 $date = preg_replace('/^(.* FROM .+) - (.+)/', '$1 TO $2', $date);
129 … $date = preg_replace('/^ +(@#[^@]+@) +FROM +(.+) +TO +(.+)/', ' FROM $1 $2 TO $1 $3', $date);
[all …]
H A DGedcomEditService.php46 use function preg_replace; alias
198 $gedcom = preg_replace('/\n\d CONT ?/', "\r", $fact->gedcom());
214 $gedcom = preg_replace('/\n\d CONT ?/', "\r", $record->gedcom());
220 return preg_replace('/^0 @[^@]+@ NOTE/', '1 CONC', $gedcom);
223 return preg_replace('/^0.*\n/', '', $gedcom);
H A DIndividualFactsService.php32 use function preg_replace; alias
853 $gedcom = preg_replace('/\n2 TYPE .*/', '', $gedcom);
854 $gedcom = preg_replace('/^1 .*/', "1 EVEN CLOSE_RELATIVE\n2 TYPE " . $type, $gedcom);
/webtrees/app/Http/RequestHandlers/
H A DDeleteRecord.php37 use function preg_replace; alias
119 …$gedrec = preg_replace('/\n1 ' . Gedcom::REGEX_TAG . ' @' . $xref . '@(\n[2-9].*)*/', '', $gedrec);
120 …$gedrec = preg_replace('/\n2 ' . Gedcom::REGEX_TAG . ' @' . $xref . '@(\n[3-9].*)*/', '', $gedrec);
121 …$gedrec = preg_replace('/\n3 ' . Gedcom::REGEX_TAG . ' @' . $xref . '@(\n[4-9].*)*/', '', $gedrec);
122 …$gedrec = preg_replace('/\n4 ' . Gedcom::REGEX_TAG . ' @' . $xref . '@(\n[5-9].*)*/', '', $gedrec);
123 …$gedrec = preg_replace('/\n5 ' . Gedcom::REGEX_TAG . ' @' . $xref . '@(\n[6-9].*)*/', '', $gedrec);
H A DSearchReplaceAction.php133 … $new_record = preg_replace('/(\n\d [A-Z0-9_]+ )' . $query . '/i', '$1' . $replace, $old_record);
160 $new_gedcom = preg_replace($pattern, $replacement, $old_gedcom);
186 $new_gedcom = preg_replace($pattern, $replacement, $old_gedcom);
H A DEditRawFactAction.php29 use function preg_replace; alias
53 $gedcom = preg_replace('/[\r\n]+/', "\n", $gedcom); // Empty lines
H A DEditRawRecordAction.php33 use function preg_replace; alias
86 $gedcom = preg_replace('/[\r\n]+/', "\n", $gedcom);
H A DMapDataExportGeoJson.php35 use function preg_replace; alias
75 $filename = preg_replace('/[^\p{L}]+/u', '-', $hierarchy[0] ?? 'Global') . '.geojson';
H A DMapDataExportCSV.php41 use function preg_replace; alias
83 $filename = preg_replace('/[^\p{L}]+/u', '-', $hierarchy[0] ?? 'Global') . '.csv';
H A DMergeFactsAction.php37 use function preg_replace; alias
108 $gedcom = preg_replace(
H A DTreePreferencesAction.php35 use function preg_replace; alias
138 $MEDIA_DIRECTORY = preg_replace('/[:\/\\\\]+/', '/', $MEDIA_DIRECTORY);
H A DSearchGeneralPage.php42 use function preg_replace; alias
245 $query = preg_replace('/\p{Han}/u', '$0 ', $query);
/webtrees/tests/app/
H A DTreeTest.php35 use function preg_replace; alias
306 $original = preg_replace('/\n2 VERS .*/', '', $original, 1);
307 $export = preg_replace('/\n2 VERS .*/', '', $export, 1);
308 $original = preg_replace('/\n1 DATE .. ... ..../', '', $original, 1);
309 $export = preg_replace('/\n1 DATE .. ... ..../', '', $export, 1);
310 $original = preg_replace('/\n2 TIME ..:..:../', '', $original, 1);
311 $export = preg_replace('/\n2 TIME ..:..:../', '', $export, 1);
/webtrees/app/Module/
H A DFixDuplicateLinks.php29 use function preg_replace; alias
232 …$gedcom = preg_replace('/(\n1.*@.+@.*(?:\n[2-9].*)*)((?:\n1.*(?:\n[2-9].*)*)*\1)/', '$2', $gedcom);
233 …$gedcom = preg_replace('/(\n2.*@.+@.*(?:\n[3-9].*)*)((?:\n2.*(?:\n[3-9].*)*)*\1)/', '$2', $gedcom);
235 … return preg_replace('/(\n3.*@.+@.*(?:\n[4-9].*)*)((?:\n3.*(?:\n[4-9].*)*)*\1)/', '$2', $gedcom);
H A DFixNameSlashesAndSpaces.php29 use function preg_replace; alias
135 …$gedcom = preg_replace('/^((?:1 NAME|2 (?:FONE|ROMN|_MARNM|_AKA|_HEB)) [^\/\n]*\/[^\/\n]*)$/m', '$…
137 …return preg_replace('/^((?:1 NAME|2 (?:FONE|ROMN|_MARNM|_AKA|_HEB)) [^\/\n]*[^\/ ])(\/)/m', '$1 $2…
H A DFixPlaceNames.php31 use function preg_replace; alias
182 return preg_replace($regex, $replace, $record->gedcom());
H A DFixSearchAndReplace.php44 use function preg_replace; alias
361 return preg_replace($regex, $replace, $record->gedcom());
/webtrees/app/
H A DIndividual.php966 $full = preg_replace('/\/\//', '/@N.N./', $value);
983 $SURNS[$n] = preg_replace('/^(?:[a-z]+ |[a-z]+\' ?|\'[a-z]+ )+/', '', $SURN);
994 $GIVN = preg_replace('/ ?\/.*\/ ?/', ' ', $full);
996 $GIVN = preg_replace('/ ?".+"/', ' ', $GIVN);
998 $GIVN = preg_replace('/ {2,}/', ' ', $GIVN);
1000 $GIVN = preg_replace('/^ | $/', '', $GIVN);
1019 …$full = '<span class="NAME" dir="auto" translate="no">' . preg_replace('/\/([^\/]*)\//', '<span cl…
1024 … $full = preg_replace('/([^ >\x{200C}]*)\*/u', '<span class="starredname">\\1</span>', $full);
H A DGedcomRecord.php45 use function preg_replace; alias
794 $gedcom = preg_replace('/[\r\n]+/', "\n", $gedcom);
875 $gedcom = preg_replace('/[\r\n]+/', "\n", $gedcom);
962 … $gedcom = preg_replace('/' . $match[0] . '(\n' . $next_levels . '.*)*/', '', $gedcom);
1164 $gedcom = preg_replace('/\n2 (DATE|_WT_USER).*(\n[3-9].*)*/', '', $gedcom);
H A DNote.php29 use function preg_replace; alias
51 return preg_replace("/\n1 CONT ?/", "\n", $match[1]);
H A DFact.php35 use function preg_replace; alias
205 $value = preg_replace("/\n2 CONT ?/", "\n", $match[1]);
271 $value = preg_replace("/\n3 CONT ?/", "\n", $match[1]);
/webtrees/app/Elements/
H A DPlaceHierarchy.php22 use function preg_replace; alias
53 $value = preg_replace('/[, ]+/', ', ', $value);
/webtrees/app/Factories/
H A DSlugFactory.php28 use function preg_replace; alias
67 $slug = preg_replace('/[^A-Za-z0-9]+/', '-', $slug);
/webtrees/app/Statistics/Google/
H A DChartCommonSurname.php29 use function preg_replace; alias
78 $top_name = preg_replace(
/webtrees/app/Report/
H A DRightToLeftSupport.php25 use function preg_replace; alias
551 … $textSpan = preg_replace('~<span class="starredname">(.*)</span>~', '<u>\1</u>', $textSpan);
562 $textSpan = preg_replace('~(.*)\*~', '\1', $textSpan);
563 $textSpan = preg_replace('~<span class="starredname">(.*)</span>~', '\1', $textSpan);

12