Use a wild card in StackDriver Logging

Solution 1:

If you want to search for strings contained in text, just type that string directly.

Unicorn (text:Unicorn)
Finds all log entries containing unicorn, in any field and in any letter case.

If you want to add conditions in advanced filter to search in all pods that begin with "prefix", try like this (note ':' instead of '='):

resource.type="k8s_container"
resource.labels.cluster_name="cluster-1"
resource.labels.pod_name:"prefix"

Solution 2:

You can check the following common basic search example:

Example:

A use of string like: uni* (text:uni*)

As explained in the above documentation "This is not a wildcard search. This search finds all log entries containing the 4-character string "uni*". The Logs Viewer does not support regular expression searches and there are no special wildcard characters such as * or ?, in either the basic or advanced filter interfaces".

You may also submit this as a Feature Request using the Issue Trackers.