📝

Conditional Text Case Changer

Change the case of text (uppercase, lowercase, title case, sentence case, inverse case) only for lines or the entire text that match a specific condition (contains, starts with, ends with, regex).

text

Input Text

Settings

The value to look for (e.g., a word, a regex pattern). Leave empty for string types to apply to nothing.

Output Text

About Conditional Text Case Changer

This tool provides a flexible way to modify the case of your text based on specific conditions. You can define a pattern or keyword to search for, choose how that condition is applied (e.g., "contains a keyword", "matches a regular expression"), and select a scope (whether to apply the condition to the entire text or to each line individually). Only the text units that meet your criteria will have their case transformed.

Features:

  • Conditional Case Changes: Apply uppercase, lowercase, title case, sentence case, or inverse case transformations only when conditions are met.
  • Flexible Conditions: Define conditions based on whether text units "Contains", "Starts With", "Ends With", or "Matches a Regular Expression" with a specified value.
  • Granular Scope: Choose to evaluate conditions and apply transformations to the "Entire Text" or "Each Line Individually".
  • Easy Interaction: Clear input, copy output, and receive clear error messages for invalid inputs (e.g., malformed regular expressions).

How to use:

  1. Input Text: Paste or type your text into the "Input Text" area.
  2. Condition Value: Enter the value you want to search for (e.g., "error", "important", "\d{3}").
  3. Condition Type: Select how the "Condition Value" should be interpreted (e.g., "Contains", "Matches Regular Expression").
  4. Apply Condition To: Choose if the condition should be checked for the "Entire Text" or "Each Line Individually".
  5. Transform Case To: Select the desired case transformation for the text units that meet the condition.
  6. Apply: Click "Apply Conditional Case Change" to see the transformed output.
  7. Copy: Use the "Copy" button to transfer the result to your clipboard.