# Inspect captures and preview a replacement

Find two item codes, inspect their named captures and preview a replacement without changing the source.

Source: https://help.smartfact.ai/patternbench/guides/captures-and-replacement

Audience: Operator

Find two item codes, inspect their named captures and preview a replacement without changing the source. This is isolated practice with invented records. Nothing is uploaded or written into a live system.

## Inspect captures and preview a replacement

1. **Enter a capture pattern**

   Enter a capture pattern.

   Each pair of letters and four digits forms an item code. Named groups make the two parts easier to reuse.

2. **Enter the item references**

   Enter the item references.

   Sarah is checking two item references from Brighouse works. The g flag requests all matches, not just the first.

3. **Set the replacement text**

   Set the replacement text.

   Named capture tokens reuse the matched letters and digits. Replacement text is never run as code.

4. **Run the pattern**

   Run the pattern.

   The worker finds two matches and produces a separate replacement preview. The original text remains unchanged.

5. **Read the pattern explanation**

   Read the pattern explanation.

   This explains the parsed syntax. It is not a trace of every backtracking operation and does not prove compatibility with another regex engine.

[Watch or practise this chapter](https://help.smartfact.ai/patternbench/demo?guide=captures-and-replacement&chapter=captures-and-replacement&audience=office)

Review the result and its limits before using it in another application.
