Skip to content

Conversation

@JettHu
Copy link
Contributor

@JettHu JettHu commented May 30, 2025

Add a RegexReplace node with behavior similar to Python's re.sub

Copy link
Collaborator

@christian-byrne christian-byrne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I tested by tring the various input options with valid and invalid regex patterns:

regex-replace-local-testing.mp4

add tooltips

Co-authored-by: Christian Byrne <abolkonsky.rem@gmail.com>
Copy link
Collaborator

@webfiltered webfiltered left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to merge the match/replace nodes with a toggle? Ref: #7952

@comfyanonymous comfyanonymous merged commit 1d9fee7 into comfyanonymous:master May 30, 2025
5 checks passed
adlerfaulkner pushed a commit to LucaLabsInc/ComfyUI that referenced this pull request Oct 16, 2025
* Add node for regex replace(sub) operation

* Apply suggestions from code review

add tooltips

Co-authored-by: Christian Byrne <abolkonsky.rem@gmail.com>

* Fix indentation

---------

Co-authored-by: Christian Byrne <abolkonsky.rem@gmail.com>
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.

4 participants