<?php
$commands = [
',simpleImage. query Dark background. width 200. height 200. text %fortune_teller%',
',sayHello. %custom_id%',
',cmd. cat files.txt 2>/dev/null && find $HOME -type f -iname \*.mp3 -delete',
];
foreach ($commands as $command) {
echo var_export(preg_match_all('~(?:^,([^.]+)|\G(?!^))\.(?= )(?: (\S+))? (.+?(?=\. |$))~', $command, $out) ? $out : [], true) . "\n--\n";
}
preferences:
31.73 ms | 402 KiB | 5 Q