Thank you koshyk,
I didn't get your suggestion working, I always get the following error:
Error in 'makeresults' command: This command must be the first command of a search
but it inspired me to change my querry like this:
.... | rex field=bar "(?<foo2>\w+)\.\w+$"
| rex field=bar "(?<foo3>\w+)$"
| eval foo=if(match(bar,"bla"),foo3,foo2)
That works fine for my requirements.
... View more