This should be doable using an eval-based macro. For example, if you wanted to turn a token containing "error,warn" into "error OR warn" you can run this search:
index=_internal `commasToOr("error,warn")`
using this eval-based macro definition:
[commasToOr(1)]
args = token
definition = replace("$token$", ",", " OR ")
iseval = 1
Looking at the job inspector, the search that was actually executed is this:
search index=_internal error OR warn
You can apply the same strategy to adding single quotes using replace, and this should work from your form as well.
... View more