How to use the multiline in for these logs

For example i have logs here:

1111
2222
3333
1111
2222
3333

now i want to combine the log with the same number just like
11111111
22222222
33333333

how can i do with the multiline???It is very urgent for me now. Thanks!!

Multiline is the wrong tool for this. The aggregate filter should be a better match.