Find Text in FilesHere is a very simple grep-like function for finding lines in a text file containing text matching a given pattern. In[142]:=  |
This creates a sample text file. In[143]:=  |
Out[143]=
|
This returns the line numbers and lines in "text.txt" containing any digit characters. In[144]:=  |
Out[144]//TableForm=
|
This finds lines containing "a" as a stand-alone word. In[145]:=  |
Out[145]//TableForm=
|
|