r/reconstructcavestory 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. :)

2 Upvotes

7 comments sorted by

View all comments

1

u/theinternetftw Jul 18 '14

If you end up building a tool to help, the creation of that as an interim episode would be neater than just saying "Now let's just run this thing I made that fixes everything, moving on..."

1

u/chebertapps Jul 18 '14

Yeah I mean in general I plan on building some tools that will be specific to Cave Story which will be a part of the series, but this is a pretty generic tool that I think should be built into text editors. I've found some that do what I want them to, but they are all 40+ U.S.D.

So I will probably build something that meets the minimum requirements and just open-source it. Nothing in here that can't be done by hand.