[plt-scheme] Grep for s-expressions

From: Dave Gurnell (d.j.gurnell at gmail.com)
Date: Wed Sep 16 13:58:21 EDT 2009

Hello all!

I vaguely remember someone mentioning this on-list before, but I can't  
think what to search for.

I have a random craving for an s-expression-based version of grep / sed.

For example, I'd like to be able to search for forms like:

     '(select _ ... student _ ...)'

throughout my codebase, and turn them into:

     '(select _ ... professor _ ...)'

without affecting any "student"s appearing outside the targetted  
expressions. The statements might be broken across lines and as far as  
possible I don't want to mess up the indentation.

Are there any existing tools out there for this kind of thing,?


-- Dave

Posted on the users mailing list.