|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
FindList
FindList["file", "text"]
gives a list of lines in the file that contain the specified string.
FindList["file", {"text1", "text2", ...}]
gives a list of all lines that contain any of the specified strings.
FindList[{"file1", ...}, ...]
gives a list of lines containing the specified strings in any of the
.
FindList[files, text, n]
includes only the first n lines found.
Details and OptionsDetails and Options
- FindList returns
if it fails to find any record which contains the specified text. - The following options can be given:
-
AnchoredSearch False whether to require that the text searched for be at the beginning of a record IgnoreCase False whether to treat lowercase and uppercase as equivalent RecordSeparators {"\r\n", "\n","\r"} separators for records WordSearch False whether to require that the text searched for appear as a word WordSeparators {" ","\t"} separators for words - The first argument to FindList can be InputStream["name", n], or simply
if there is only one open input stream with the specified name. - If FindList opens a file or pipe, it closes it again when it has finished.
New in 2
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »

