Filter lines by matching characters

Assuming I have a filter text box and I write “asdsa”, I would only want to show the lines that have those matching characters. Is this feature existent in code mirror already ?

If not, any idea on how to approach this ?

No. But you might be able to implement it by using markText to hide all non-matching lines.