Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Option to delete matching lines #19

Open
harthur opened this issue Feb 21, 2013 · 3 comments
Open

Option to delete matching lines #19

harthur opened this issue Feb 21, 2013 · 3 comments

Comments

@harthur
Copy link
Owner

harthur commented Feb 21, 2013

This would be useful for removing console.log() lines.

@bhimsen92
Copy link

That can be done by replacing console.log() with empty string.
eg: replace "console.log((.*));" "" foo.js
So no need for delete option.

@harthur
Copy link
Owner Author

harthur commented Feb 22, 2013

That will get rid of the statement, but will leave a newline. There still might be a way though...

@bhimsen92
Copy link

how about this:
replace "console.log((.))\s;\s*" "" foo.js

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants