mardi 3 février 2015

How to search many files with regular expression and output matches to lines in a new file?


I have 1000's of source files and I would like to find all text that matches a regular expression and then output each match on its own line in a resulting text file.


For instance;



// a.cs
string test = _.Text("Hello World!") + _.Text("Foo");
// b.cs
Debug.Log(_.ActionText("Bar"));

// results.txt
_.Text("Hello World")
_.Text("Foo")
_.ActionText("Bar")


Which command would is capable of achieving this? could you please show an example?



Aucun commentaire:

Enregistrer un commentaire