Skip to content

fix[DDMUploader]: apply regex-replace/delete-match rules to regex matched fields - #51

Open
beilrz wants to merge 1 commit into
uzh:mainfrom
beilrz:feature/regex_field_replace
Open

beilrz wants to merge 1 commit into
uzh:mainfrom
beilrz:feature/regex_field_replace

Conversation

@beilrz

@beilrz beilrz commented Oct 13, 2026

Copy link
Copy Markdown

Issue

The regex-delete-match and regex-replace-match operators checked whether the matched data key was present in the extracted row. The extracted row is keyed by the rule's field, which for a regex field is the pattern itself, so these rules were silently skipped whenever "regex field" was enabled. For example, if the "^test:chat:.*" is used to match field "test:chat:792179ee83d1" in the extraction, the regex-delete-match and regex-replace-match cannot be used for deleting/replacing string in matched output, without specify the actual name of the field.

Fix

extractionEngine.ts is updated to use rule.field instead for handling regex matched field. Also add tests for the extraction engine, including a chat-message redaction case.

…ched fields.

The regex-delete-match and regex-replace-match operators checked whether the
matched data key was present in the extracted row. The extracted row is keyed
by the rule's field, which for a regex field is the pattern itself, so these
rules were silently skipped whenever "regex field" was enabled. Check
rule.field instead.

Add tests for the extraction engine, including a chat-message redaction case.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TuYaXTVENZeff6o2Eb3Jfz

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants