Differential D13997 Diff 33822 src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php
| Show All 18 Lines | public function parseCorpus($corpus) { | ||||
| $monogram_pattern = $this->getMonogramPattern(); | $monogram_pattern = $this->getMonogramPattern(); | ||||
| $pattern = | $pattern = | ||||
| '/'. | '/'. | ||||
| '(?:^|\b)'. | '(?:^|\b)'. | ||||
| $prefix_regex. | $prefix_regex. | ||||
| $infix_regex. | $infix_regex. | ||||
| '((?:'.$monogram_pattern.'[,\s]*)+)'. | '((?:'.$monogram_pattern.'(?:\b|$)[,\s]*)+)'. | ||||
| '(?:\band\s+('.$monogram_pattern.'))?'. | '(?:\band\s+('.$monogram_pattern.'(?:\b|$)))?'. | ||||
| $suffix_regex. | $suffix_regex. | ||||
| '(?:$|\b)'. | '(?:$|\b)'. | ||||
| '/'; | '/'; | ||||
| $matches = null; | $matches = null; | ||||
| $ok = preg_match_all( | $ok = preg_match_all( | ||||
| $pattern, | $pattern, | ||||
| $corpus, | $corpus, | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||