# How do I filter a file based on millions of search strings?

Let’s say we have a file that we want to filter called `database.txt` and a list of strings that we want to filter with, separated by newline, called `search strings.txt`.

1. Open `database.txt`.
1. In the **Filter toolbar**, open [**Advanced Filter**](https://www.emeditor.org/en/dlg_advanced_filter_index.html).
1. Drag-and-drop `search strings.txt` from **File Explorer** to the **Find** list on the left panel.
1. Click **Filter**.\
    ![Advanced Filter](/media/2022/10/ygMqe.webp)
1. To save the filtered lines, in the **Filter toolbar**, click **Extract All | Extract Matched Strings**.\
    ![Extract All](/media/2022/10/i0ZsY.webp)
