Skip to content

Conversation

xavdid
Copy link
Contributor

@xavdid xavdid commented Jan 14, 2025

I was super confused about why my regex wasn't working with trim_end_match and it wasn't until I found #1658 that I figured out why.

I think calling the second parameter pattern implies that it's a regex pattern when it's not. I changed it to substr to imply it's just a regular string (it is), we could also add additional docs to that effect.

fixes #1983

@casey casey enabled auto-merge (squash) January 15, 2025 00:33
@casey
Copy link
Owner

casey commented Jan 15, 2025

Good idea, that's much better. I changed substr to substring.

@casey casey merged commit bea1f6b into casey:master Jan 15, 2025
5 checks passed
@xavdid xavdid deleted the readme-fixes branch January 15, 2025 03:36
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.

clarify the matching pat in replacement documentation
2 participants