Categories

String Contains

Check if a string contains specified substrings or characters

Key Facts

Category
Text Processing
Input Types
textarea, text, checkbox
Output Type
text
Sample Coverage
4
API Ready
Yes

Overview

The String Contains tool allows you to quickly verify if a specific block of text includes one or more target substrings, helping you filter data and validate content with precision.

When to Use

  • Verifying if specific keywords or error codes exist within large log files.
  • Filtering lists of data to identify entries that contain required identifiers.
  • Checking text inputs for compliance with specific naming conventions or forbidden terms.

How It Works

  • Paste your source text into the primary input field.
  • Enter the substrings you are searching for, separated by commas.
  • Toggle case sensitivity or the 'Match All' requirement to refine your search criteria.
  • Execute the check to instantly see which terms were found within your text.

Use Cases

Validating log files for specific error messages or status codes.
Screening user-submitted forms for prohibited words or phrases.
Quickly locating specific product IDs or serial numbers within a long inventory list.

Examples

1. Log File Error Detection

System Administrator
Background
An administrator needs to check a server log for critical failure indicators.
Problem
Manually scanning thousands of lines to find 'CRITICAL' or 'FAILED' status entries.
How to Use
Paste the log content into the text area and enter 'CRITICAL, FAILED' in the search terms field.
Outcome
The tool identifies if any of the specified error keywords are present in the log, allowing for immediate troubleshooting.

2. Data Compliance Filtering

Data Analyst
Background
A dataset contains mixed records, and the analyst needs to isolate entries containing specific regional codes.
Problem
Identifying which records belong to specific regions without using complex spreadsheet formulas.
How to Use
Input the list of records and set the search terms to the desired region codes (e.g., 'US, EU, APAC').
Outcome
The tool confirms the presence of these codes, enabling the analyst to categorize the data efficiently.

Try with Samples

text

Related Hubs

FAQ

Can I search for multiple terms at once?

Yes, simply enter your search terms separated by commas in the search field.

Does the tool distinguish between uppercase and lowercase letters?

By default, it is case-insensitive, but you can enable the 'Case Sensitive' option to enforce strict matching.

What does the 'Match All' option do?

When enabled, the tool will only return a positive result if every single term you provided is found within the text.

Is there a limit to the amount of text I can check?

The tool is designed to handle large blocks of text, though extremely large files may perform better if processed in smaller segments.

Does this tool modify my original text?

No, this is a read-only utility that only analyzes your input to report the presence of specified substrings.

API Documentation

Request Endpoint

POST /en/api/tools/string-contains

Request Parameters

Parameter Name Type Required Description
textInput textarea Yes -
searchTerms text Yes -
caseSensitive checkbox No -
matchAll checkbox No -

Response Format

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Text: Text

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-string-contains": {
      "name": "string-contains",
      "description": "Check if a string contains specified substrings or characters",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=string-contains",
      "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.

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