Implementation check required: only use parameters verified in your installed tool schema. Automatic backups, retries, command-history listing, multi-file search, selective extraction, binary mode, permission reporting and timeout support are not established by these examples. Create backups separately before changes.
FindText
FileTools
Description
Search files for text at lightning speed! FindText offers powerful search capabilities with optional regex support to find complex patterns in files - perfect for log analysis and text processing.
With line number reporting and multiple matches per file, you find exactly the places you are looking for. Support for case-sensitive and case-insensitive search gives you full control over the results.
Why This Tool Stands Out
- Fast Search even in large files
- Regex Support for complex patterns
- Line Numbers for every match
- Multiple Matches per file
Perfect for:
Developers who search code; system administrators who find errors in logs; data analysts who identify patterns in text files; and anyone who needs to search files for specific text. Ideal for debugging and text analysis.
Workflow support; time savings depend on the task
Instead of opening files manually and searching with Ctrl+F, search multiple files at once with regex patterns - with precise line references and full context.
JSON Parameters
- filePath REQUIRED (String)The path of the file to search. Example: "C:\\Logs\\error.log"
- searchText REQUIRED (String)The text or regex pattern to search for. Example: "ERROR" or "\\d{4}-\\d{2}-\\d{2}"
- caseSensitive OPTIONAL (Boolean)If true, the search is case-sensitive. Default: false
- regex OPTIONAL (Boolean)If true, searchText is interpreted as a regular expression. Default: false
Example Call
{
"tool": "FindText",
"params": {
"filePath": "C:\\Logs\\application.log",
"searchText": "ERROR|EXCEPTION|FATAL",
"caseSensitive": false,
"regex": true
}
}
Return Values
The tool returns an object with the following properties:
- found (Boolean)
True if the text was found - matches (Array)
Array of match objects with line numbers and text - matchCount (Integer)
Total number of matches - linesSearched (Integer)
Number of lines searched - filePath (String)
Path of the file that was searched - searchTime (Integer)
Search duration in milliseconds
Example Usage
Step-by-step guide:
- Select the file to search (e.g., a log file)
- Define the search text or a regex pattern (e.g., "ERROR|WARN")
- Decide whether the search should be case-sensitive
- Enable regex for complex pattern searches
- The tool returns all matches with line numbers and context
Related Tools
Ready to Search Files Efficiently?
Use FindText for fast text analysis and log evaluation. Integrate it into your debugging workflows now!
Discover All FileTools