Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Regex type 'To' type so that both from and to string can be regex #188

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

twok020101
Copy link

In typescript 'to' parameter was restricted to only string, but in general this works very well with RegExp as well. This is edited and used in one of my projects.
This resolves #166 (Same person with different account)

@adamreisnz
Copy link
Owner

Thanks for the PR, can you elaborate a bit more on how that would work, using a RegEx as a replacement? How does that work?

According to the documentation, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace, the replace function only seems to accept a string or a function.

Can you give me a code example of how this would be used so I can test it out?

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.

Regex in to
2 participants