Regex Filter (Coming soon)

The regex filter lets you restrict when Coreply fetches suggestions, so suggestions are only fetched when the current typing text matches a pattern. This reduces unnecessary API calls.

Settings

SettingDescription
Enable Regex FilterToggle to turn the filter on or off
Typing Regex PatternA regex tested against the full current typing text

The regex is tested with containsMatchIn.

Default Pattern

^.*[\s.!?,;:]$

Matches any string that ends with whitespace or these punctuation characters: ., !, ?, ,, ;, :. So that suggestions are fetched only after the user finishes a word (types a space) or ends a sentence by typing one of these punctuation characters.

Examples

Only after a complete word (ends with space)

\s$

Fetches suggestions only when the user has typed a space, indicating the end of a word.

Only after sentence-ending punctuations

[.!?]$

Fetches suggestions only when a sentence has been completed with ., !, or ?.

Only when the typing is at least 10 characters long

^.{10,}

Fetches suggestions only when the user has typed at least 10 characters.

Always fetch (disable the filter entirely)

Just uncheck Enable Regex Filter — the regex setting has no effect when disabled.

Tips

  • Use $ to match the end of the current typing
  • Use ^ to match the beginning
  • Test your regex pattern against sample text to ensure it works as expected
  • Start with the default pattern and modify it based on your needs