AI Assistant
Use AI Assistant to explain a pattern, refine a regex, create examples, or change a Text Pipeline. It can also suggest substitution and extraction templates. Review the reply and local check results, then apply the changes you want.
- Free
- Unavailable
- Pro
- Included
- Self-hosted
- AI tooling bundle
Attach tests for valid, short, and overlong order IDs, then send a request and review the reply. Apply the checked fix, undo it, and reapply it to make all three tests pass.
Send a request
- Open AI Assistant from the right sidebar.
- If required, sign in. If a first-use notice appears, read it and select I understand.
- Attach representative test strings or unit tests.
- Describe the result you want, including cases that must fail.
- Select Send or press Enter.
Use Shift + Enter to insert a new line. The assistant receives the current pattern, flavor, flags, templates, and parser errors with your message. Input text is shared through attachments. See Provider and privacy.
You can also start from the editor:
- Ask AI Assistant beside an error or nonmatching input prepares a request about that problem.
- Fix with AI Assistant beside an expanded test failure, or in its menu (⋮), attaches that test.
- Pipeline actions > Refine with AI prepares a pipeline request.
These shortcuts start a new conversation. Review the prepared message and attachments, then select Send.
Use unit tests as examples
- Select the flavor used by your application.
- Create expected results in Unit Tests.
- Open Attachments below the assistant message field.
- Under Unit tests, select cases in Choose unit tests, or use Select all.
Selections attach immediately. The Unit tests chip shows the selected count. Reopen Attachments to change the selection. Remove the chip to exclude all selected tests.
Each selected test shares its input, description, assertion, and expected value.
Tests can describe matching, nonmatching, full-match, and capture expectations.
For example, a test for ORD-0042 can require capture group 1 to equal 0042.
Edit tests in Unit Tests. Your next request uses their updated values.
Attach input examples
- Add representative test strings in the regex editor.
- Open Attachments below the assistant message field.
- Under Test strings, select inputs in Choose test strings.
The picker includes all test strings, regardless of the active tab. Selections attach immediately. The Test strings chip shows their count. Reopen Attachments to inspect or change the selection. Remove the chip to exclude all selected inputs. Edit the original test strings in the editor. Your next request uses their updated text.
To share part of a large document, select text in its editor. Select the paperclip button in the editor footer. This creates and attaches a new test string named after the source, such as Selection — Input 1. The shortcut opens the assistant and keeps your current draft.
Refine a Text Pipeline
- Open a Text Pipeline.
- Select Pipeline actions > Refine with AI, or open AI Assistant from the right sidebar.
- For multiple layers, use Editing scope to choose which layers the assistant can change.
- Describe the desired change.
- Optionally attach an input selection or Expected output.
- Select Send.
Choose the editing scope
Entire pipeline is the default for pipelines that fit the scope selector. With multiple layers, open Editing scope below the message field. Drag the handles to choose a range. The summary shows the layer names. Focus a handle to adjust it with the arrow keys.
For large pipelines, the selector starts with a fixed-size range at the beginning. Move either handle to shift that range to the layers you want to change.
The assistant can change, add, remove, or reorder layers within the range. The last selected layer remains the range's output point. Layers outside the range stay unchanged.
Attach input and expected output
To share input, select text in the pipeline's Input editor, then select its footer paperclip button. The selection becomes a chat attachment. Later input edits do not change this selection. To replace it, remove its chip and attach a new selection.
Open Attachments, enter Expected output, and select Attach. To change it, reopen the popover, edit the text, and select Update. Remove the Expected output chip to exclude it.
Expected output describes the result for the full pipeline input, even if you attach only a selection. For a selected range, it describes the output of the last selected layer. For Entire pipeline, it describes the final output. Comparison includes all whitespace. Attaching an empty value expects an empty result.
The browser checks the proposed pipeline against the full input from when you sent the request. It also runs layers after the selected range. The chat shows completed layers, any failed layer, and whether the expected output matches. Select Apply pipeline to inspect the changes in the editor.
Explore a pattern
Ask for an explanation, matching examples, or edge cases. For example:
Explain why this pattern accepts
ORD-42.
Suggest matching and nonmatching test strings. Keep the regex unchanged.
Suggest unit tests for empty input, extra characters, and capture values.
Suggested test strings and unit tests appear as selectable names. Test strings also show character counts. Select Add selected test strings to open them as editor tabs. Select Add selected unit tests to add and inspect their expectations in Unit Tests.
Review and apply suggestions
Suggested patterns and templates show syntax highlighting. For regex or template changes, the browser checks your existing unit tests and enabled test strings. These checks use a copy of the editor content from when you sent the request, including examples you did not attach.
The result list shows passed tests and each input's match, replacement, or extraction count. Select Unit tests or an input row to open that editor view. These links do not apply the suggestion. Apply it first to inspect its failures or output in the editor.
Results remain fixed after the reply. If you edit the checked tests or inputs, a warning identifies results from the earlier state. Apply the suggestion to try it against your current content, or send a follow-up request for another suggestion. For a failed expectation, describe what must change and include the relevant test.
Use the arrow beside a pattern or template to apply it. The action then changes to Undo.
- Apply regex updates the pattern and flags while keeping your current editor mode.
- Apply substitution or Apply extraction updates the template and opens its mode. Apply the suggested regex separately if needed.
- Apply pipeline updates the layers and keeps your input.
You can apply a suggestion with errors and edit it yourself. A failed or incomplete check is not a pass. Without examples, regex checks cover syntax only.
Undo restores the content from immediately before Apply. If later edits would be overwritten, Apply or Undo asks for confirmation. For added tests and test strings, Undo removes the additions and warns if you edited them.
A new suggestion replaces the previous suggestion and its Undo actions. Discard suggestion (×) removes the suggestion and its Undo actions. Your editor content stays unchanged.
Request size
Use short, representative examples instead of full documents. The attachment picker warns if you select too much content or too many examples. Use fewer tests, smaller inputs, or a text selection.
If the conversation becomes too large, select New conversation. Attach only the examples needed for the next task.
Provider and privacy
On regex101.com, AI Assistant uses OpenAI. See the privacy policy for data handling. Editor content is sent when you submit a request, after you acknowledge the first-use notice. Opening the panel or selecting I understand does not send your editor content to OpenAI.
Each request includes your message, relevant conversation history, and editor context:
- Regex: the pattern, flavor, flags, delimiter, substitution and extraction templates, and parser errors.
- Text Pipeline: the layers, their settings, and the selected editing scope.
- Attachments: selected test strings, unit tests and their expectations, input selections, or expected output.
Follow-up messages can include previous suggestions and check results for shared examples. Pipeline follow-ups can include output comparisons if you attached the full input. Input used only for local checks stays in your browser. Earlier context can remain after you remove an attachment. Start a new conversation to clear the chat history.
In Enterprise, your administrator chooses the provider and its data settings. An external provider receives request content outside your deployment.
Usage limits
Regex and pipeline requests share your AI allowance. Select AI allowance beside Send to see the percentage used and when it resets. The indicator warns as you approach the limit. Local checks do not use your AI allowance.
If you reach the allowance or a temporary request limit, the chat shows when you can try again. Send and Retry become available when the limit resets.
Progress and stopping
The assistant shows progress while it prepares the reply. Checking… means local checks are running. The reply appears after those checks finish. You can write your next draft while you wait.
Select Stop to cancel the current request and any local checks. Your previous suggestion remains available. If you stop a new request while the message field is empty, its message returns there. Closing or collapsing the sidebar keeps the request running. Reopen the assistant to see its progress or reply.
Retry a failed request
Errors stay beside failed messages in the chat. Select Retry on the latest failed message. It uses the current editor context and attachments, while keeping your next draft unchanged. If a temporary limit applies, Retry becomes available after the displayed wait.
Start a new conversation
Select New conversation at the top of the panel. If the chat contains messages, a draft, or attachments, confirm before replacing them. Task-specific AI shortcuts use the same confirmation.
A new conversation clears the chat, attachments, suggestions, and Undo actions. It also stops the active request. Your editor content stays unchanged.
Closing the sidebar, switching regex modes, or saving the current workspace keeps the conversation. Opening another workspace, switching between Regex Editor and Text Pipeline, or leaving the editor clears it and stops active work. Reloading the page, signing out, or changing accounts also clears the conversation.