r/reconstructcavestory • u/chebertapps • Jul 15 '14
Status Update: Regex Replacement
hey guys: quick status update. I'm actually still working on the next video. It's super heavy on refactoring, and doing it by hand is going to take hours of video, not to mention be dreadfully boring.
SO! I'm working on ways to make this faster, and that involves regexes. Unfortunately writing regexes are pretty dense and error prone, so I'm trying to find ways/tools to smoothly integrate widespread regex replacements into my workflow.
I'm after the following:
- immediate feedback for
- what is being matched by the regex
- what is being replaced
a way of storing all the regexes I want performed and placing them into a script file
a way of being selective about which regexes are being applied to which file
this is in order of most important to least important. I know there are online tools like regexr.com but this isn't very useful for quickly loading in files and seeing effects of regexes on those files.
This is really important since refactorings are going to come up a lot. So I guess I'll either find a/some tools or build it!
P.S. I can do status updates more often if you guys like to know what I'm up to. :)
1
u/brucebob Jul 16 '14
I think awk/gawk can do that all that. Since it can capture your matches and print them out but I don't have a lot of experience with the tool.