T4: Fix Python sub() named groups + add named_group() to PyMatch #41
Labels
No labels
Epic
GHA
Release
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
major
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
NiXTheDev/Ogex#41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task 4: Fix Python Named Groups
Wave: 1 (Critical Bug Fixes)
Category: unspecified-high
Parent: Epic #37
Problem
Python sub() creates empty HashMap for named groups (line 93), so \g{name} in replacements doesn't work. PyMatch also missing named_group() method.
What to do
Acceptance Criteria
ogex.sub(r"(name:abc)", r"[\g{name}]", "abc")returns "[abc]`match.named_group("name")returns captured group textFiles
ogex-python/src/lib.rs:93— empty HashMap for named groupsogex-python/src/lib.rs:110-183— PyMatch classCommit
fix: Python sub() named groups + add named_group()