47 $regex =
'/\{(\d+):([^}]+)\}/Us';
49 preg_match_all( $regex, $text, $matches, PREG_SET_ORDER );
51 foreach ( $matches as $instance ) {
52 $original = $instance[ 0 ];
53 $variable = $instance[ 1 ];
54 $forms = explode(
'|', $instance[ 2 ] );
55 $ldns[ $variable ] = $ldns[ $variable ] ?? [];
56 $ldns[ $variable ][] = [
58 'original' => $original,