In what sense is the documentation vague? Anything you write before the first pipe in the search field is added as arguments to the search command (http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search ). The search command has no support for matching using regular expressions.
The regex command (http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Regex ) does, however. But, regex is used as a separate filtering command, so you can't mix filtering expressions in the search command and then OR them together with what you filter on in the regex command.
My suggestion is, since you're looking for specific information in specific places in your logs, setup field extractions and then do wildcard matching on the specific fields. For instance, you could extract HTTP response codes to a field, let's call it response_code , and then do
host="hostname" source="source_name.log" (error OR response_code="4*" OR response_code="5*")
... View more