I don't think there's a regular expression, or really any tight spec, for what constitutes a valid ID or parameter. I'd suggest valid C variable names, but we are already beyond having that. Also, SPASE IDs are used in some places, so this should be supported as well.
To get the conversation started, I'd suggest:
[a-zA-Z_]+[a-zA-Z0-9_/:-+]*
where plus is understood to be an alias for spaces when options are displayed.