The File contents filter is used to filter search results based on
the actual contents of files that have passed the File name
filter.There are two modes available to the File contents
filter:
- Plain text: A literal substring of text
Example: ohn Bro
will match John Brown
- Regular expression: A PCRE-compatible regex pattern
Example: \d{4} was a g.*?d
y\w{2}r will match 2008 was a good year
In addition to these modes, there are several options to choose from to
determine the behavior of those modes:
- Case sensitive: The text being searched will be compared with the
pattern given in a case-sensitive manner. Case-sensitivity is disabled by
default. If case sensitivity is enabled, john will not match John.
Unlike the File name
filter's pattern, this behavior is independent of the file
system.
- Output matched lines: The crawler will send the line number and the
text on that line of the file as well as the path of the file that has matched
the search filter(s).
- Whole file: The text of the entire file being searched will be passed
through the filter pattern instead of each line being processed individually.
Regular expressions can take advantage of the line breaks in their pattern
definitions. This option is not available in Plain text mode.
- Ignore new line: If the Whole file is being passed through the
filter, this option can be used to help the regular expression engine to prevent
the new-line character(s) failing to match the catch-all dot (".") regex special
character. This option is only available if Whole file is checked.
The File contents filter can be disabled by un-checking the box to the far
right of the label, just above the filter pattern text box. |