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

Possible to make multiple (regex) replacements in a single pass? #24

Closed
dustinbolton opened this issue Feb 19, 2016 · 3 comments
Closed

Comments

@dustinbolton
Copy link

I'd like to make multiple regex replacements in a single pass of the file. Is this possible, or do I need to run through the file multiple times? I am making several replacements on a very large file so I'm trying to find the most performant solution. Thanks!

@stevemao
Copy link
Collaborator

I don't understand your question. Can you elaborate?

@rodrigopolo
Copy link

@dustinbolton You can connect one stream after another, chaining. A stream only goes one time trough the file.

@stevemao
Copy link
Collaborator

Thanks @rodrigopolo , assume your understanding is correct, @dustinbolton you might wanna learn more about stream.https://nodejs.org/dist/latest-v5.x/docs/api/stream.html

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

No branches or pull requests

3 participants