19 preg_match_all(
'/\$(1[a-z]+|[0-9]+)/', $text, $matches, PREG_SET_ORDER );
20 $new = array_map(
static function ( $match ) {
23 $insertables = array_merge( $insertables, $new );
27 '/({{((?:PLURAL|GENDER|GRAMMAR):[^|]*)\|).*?(}})/i',
32 $new = array_map(
static function ( $match ) {
33 return new Insertable( $match[2], $match[1], $match[3] );
35 $insertables = array_merge( $insertables, $new );