OK, I just open an issue (https://github.com/OCSInventory-NG/UnixAgent/issues/10)
And for your information, + and * are not the same :
/^(\S+)---(\S+)---(\S+)---(.*)/
/^(\S+)---(\S+)---(\S*)---(.*)/
Lets take an example with (cron, sed, and mypackage). The script uses the following command to display the packages :
dpkg-query --show --showformat='\${Package}---\${Version}---\${Installed-Size}---\${Description}\n'
So we have the following lines displayed :
$cron---$3.0pl1-124---$300---$process scheduling daemon
$mypackage---$1.0.1-1---$---$my custom package
$sed---$4.2.1-10---$847---$The GNU sed stream editor
With the original and faulty regex /^(\S+)---(\S+)---(\S+)---(.*)/
Only cron and sed are added as softwares.
When I fix the original and faulty regex by /^(\S+)---(\S+)---(\S*)---(.*)/
Then all the packages are added as software.