skip to Main Content

I have a text file I’ve been viewing in visual studio code:

here is one line
problem path: path1
another line
value line more info
value
problem path: path2
incredible data line
problem path: path3

And I want to copy every line which includes with the text problem path: so my output result will look like

problem path: path1
problem path: path2
problem path: path3

Can i ctrl+f search for ‘problem path’ in my text file, select every line where it occurs, and copy/paste those lines into a new file?

2

Answers


  1. This is the expression you can use https://regex101.com/r/wJVNJR/1

    Find: problem path:.+

    You have to use a programming language to write the content to a separate file.

    Login or Signup to reply.
    • open find box Ctrl+F
    • type problem path: or some regex
    • press Alt+Enter
    • press Home incase a line contains multiple finds and to get only a cursor and not a selection on the line
    • press Ctrl+C
    • in the other file: Ctrl+V
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search