command: sudo pacman -Ss *workbench
result: error: search failed: invalid regular expression
command: sudo pacman -Ss workbench*
result:

Is this expected or have I got the initial command wrong?
>Solution :
The star * is a quantifier in regular expressions. That means it governs how often to repeat what comes before it.
You can’t write *workbench because there is nothing before the *. (You’re probably thinking of shell patterns, which are not regular expressions.)
But you can write workbench*, which would match "workbench" and "workbenchhhhhhhh", and "workbenc" (!).
Overall you don’t need the star here at all. The expression workbench will match in the middle of the string without it.
sudo pacman -Ss workbench