I have been wanting to make a program to do global regex substitutions using user input (most likely my own). I started this some time ago and after seeking counsel on this, I got the impression that the only way to do this was using eval(). After some enlightenment on the terrors of user input and eval(), I dropped it.
However, my code editor (Smultron) does global subs using perl regex without any limitations of the expression input that I have yet discovered, so it would seem that there must be a safe way to do this.