# Read a compile error and recover with a corrected pattern

Keep the source text while correcting an invalid expression, then check fresh results.

Source: https://help.smartfact.ai/patternbench/guides/pattern-refusal

Audience: Operator

Keep the source text while correcting an invalid expression, then check fresh results. This is isolated practice with invented records. Nothing is uploaded or written into a live system.

## Read a compile error and recover with a corrected pattern

1. **Enter an incomplete character class**

   Enter an incomplete character class.

   An opening bracket without its closing bracket is not a complete JavaScript pattern.

2. **Read the compile error**

   Read the compile error.

   No match result is produced from an invalid pattern. The text stays available so you can correct the pattern deliberately.

3. **Complete the character class**

   Complete the character class.

   This pattern now means one uppercase ASCII letter. Changing the input discards the previous result.

4. **Enter an item prefix**

   Enter an item prefix.

   The default global flag will find both letters. JavaScript results still do not establish PCRE or .NET behaviour.

5. **Run a fresh worker**

   Run a fresh worker.

   The corrected expression produces two matches in a new disposable worker. Stop is available during a slow run, and the work limit protects the page.

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

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