qcz / vscode-text-power-tools

Text Power Tools extension for VS Code
https://marketplace.visualstudio.com/items?itemName=qcz.text-power-tools
MIT License
96 stars 14 forks source link

Search for multiple patterns in a file #21

Closed BrendanSimon closed 3 years ago

BrendanSimon commented 3 years ago

Can I filter on multiple patterns in a file?

I have a large syslog file and I want to be able to filter certain patterns (filter out noise except for the number of patterns I'm interested in).

With grep I would do something like:

cat mylog | grep "pat1\|pat2\|pat3"

How do I do the same with TPT?

qcz commented 3 years ago

You can use the Filter lines matching a regex (grep) command and enter pat1|pat2|pat3 or any other regular expression.

BrendanSimon commented 3 years ago

ok thanks. I was trying pat1\|pat2\|pat3. Great :)