Categories

Text File Searcher

Search for text patterns in files with advanced options (regex, case-sensitive, whole word, etc.)

Click to upload file or drag and drop file here

Maximum file size: 10MB

Key Facts

Category
Utilities
Input Types
file, text, select, checkbox, number
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The Text File Searcher is a powerful utility designed to help you quickly locate specific text patterns, keywords, or complex strings within your local files using advanced filtering options like regex and case sensitivity.

When to Use

  • Locating specific error codes or log entries within large text-based files.
  • Extracting data patterns using regular expressions for technical analysis.
  • Filtering file content to find exact phrases or specific word occurrences.

How It Works

  • Upload the file you wish to scan using the file picker.
  • Enter your search term and select your preferred search type, such as 'Contains' or 'Exact Match'.
  • Toggle advanced settings like 'Case Sensitive', 'Whole Word Only', or 'Use Regular Expression' to refine your results.
  • Choose your desired output format and click search to view the results with optional line numbers.

Use Cases

Debugging software logs by searching for specific timestamp formats or error strings.
Auditing configuration files to verify specific settings or parameter values.
Extracting specific data points from structured text reports for further processing.

Examples

1. Finding Error Codes in Logs

Software Developer
Background
A developer needs to identify all occurrences of a specific database timeout error in a 50MB log file.
Problem
Manually scrolling through thousands of lines is inefficient and prone to error.
How to Use
Upload the log file, enter 'DB_TIMEOUT' in the search field, and select 'Detailed' output format.
Example Config
searchType: contains, caseSensitive: true, includeLineNumbers: true
Outcome
A list of all lines containing the error, complete with line numbers and surrounding context for quick debugging.

2. Extracting User IDs via Regex

Data Analyst
Background
An analyst has a raw text export containing mixed data and needs to isolate all 8-digit user IDs.
Problem
Standard text search cannot identify variable patterns like ID sequences.
How to Use
Upload the text file, enable 'Use Regular Expression', and enter the pattern '\d{8}'.
Example Config
regex: true, outputFormat: csv
Outcome
A clean CSV list of all 8-digit IDs found within the document, ready for import into a spreadsheet.

Try with Samples

text, regex, file

Related Hubs

FAQ

Can I search for multiple patterns at once?

Currently, the tool supports searching for one specific text pattern or regular expression per operation.

Does this tool support large files?

Yes, you can search through large text files, and you can use the 'Maximum Results' setting to limit the output if necessary.

What output formats are available?

You can export your search results in Detailed (with context), Simple (lines only), CSV, or JSON formats.

Is the search case-sensitive?

By default, it is not, but you can enable the 'Case Sensitive' checkbox to ensure the search respects character casing.

Can I use regex for complex searches?

Yes, simply enable the 'Use Regular Expression' checkbox to perform advanced pattern matching.

API Documentation

Request Endpoint

POST /en/api/tools/text-file-searcher

Request Parameters

Parameter Name Type Required Description
filePath file (Upload required) Yes -
searchText text Yes -
searchType select No -
caseSensitive checkbox No -
wholeWord checkbox No -
regex checkbox No -
includeLineNumbers checkbox No -
maxResults number No -
outputFormat select No -

File type parameters need to be uploaded first via POST /upload/text-file-searcher to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-text-file-searcher": {
      "name": "text-file-searcher",
      "description": "Search for text patterns in files with advanced options (regex, case-sensitive, whole word, etc.)",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=text-file-searcher",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]