w

Basic Usage Guide

This guide will walk you through the fundamental features of the Text Replacer tool, from simple text replacement to basic regular expressions.

Interface Overview

The Text Replacer interface is divided into two main sections:

Left Panel - Input Controls

  • Find Pattern: Enter text or regex to search for
  • Replace Pattern: Specify replacement text
  • Input Text: The text to process
  • Options: Configure replacement settings

Right Panel - Results

  • Replace Results: Shows the final output
  • Match Preview: Lists all found matches
  • History: Recent replacement operations

Simple Text Replacement

Step 1: Enter Find Pattern

Type the exact text you want to find:

hello

Step 2: Enter Replace Pattern

Specify what to replace it with:

hi

Step 3: Input Your Text

Paste or type the text to process:

hello world, hello everyone

Step 4: View Results

The tool will show:

  • Replaced text: hi world, hi everyone
  • Match count: 2 occurrences
  • Matches found: hello, hello

Using Examples

The tool includes built-in examples to help you get started:

  1. Click the "Load Example" button
  2. The tool will populate with a sample pattern
  3. Study the pattern and results
  4. Modify the example to suit your needs

Example: Name Formatting

Find Pattern: \b(\w+)\s+(\w+)\bReplace Pattern: $2, $1Input:

John Doe
Jane Smith
Bob Johnson

Result:

Doe, John
Smith, Jane
Johnson, Bob

Replacement Options

Use Regex

  • Enabled: Use regular expression patterns
  • Disabled: Treat find pattern as literal text

Global (g)

  • Enabled: Replace all occurrences
  • Disabled: Replace only the first occurrence

Ignore Case (i)

  • Enabled: Case-insensitive matching
  • Disabled: Case-sensitive matching

Multiline (m)

  • Enabled: ^ and $ match line boundaries
  • Disabled: ^ and $ match string boundaries

Common Patterns

Basic Word Replacement

Find:    cat
Replace: dog

Case-Insensitive Replacement

Find:    (?i)hello
Replace: Hi

Remove Extra Spaces

Find:    \s+
Replace: (single space)

Add Line Numbers

Find:    ^
Replace: 1.

Tips for Success

Start Simple

  • Begin with literal text replacement
  • Gradually introduce regex patterns
  • Test with small text samples first

Use Preview

  • Check the match preview before replacing
  • Verify the pattern matches what you expect
  • Adjust patterns based on preview results

Save Your Work

  • Use the history feature to save successful patterns
  • Copy results to clipboard for external use
  • Clear history when working with sensitive data

Troubleshooting

No Matches Found

  • Check if "Use Regex" is enabled when using regex patterns
  • Verify the find pattern is correct
  • Try with a simpler pattern first

Unexpected Results

  • Review the match preview
  • Check replacement options (global, case sensitivity)
  • Test with a smaller text sample

Regex Errors

  • Use the built-in validation
  • Start with basic patterns
  • Reference the Regex Cheatsheet

Next Steps

Now that you understand the basics, explore:

Ready to try it? Open the Text Replacer tool and start with the built-in example!

Was this page helpful?