in reply to back translating regular expressions

As a general case, or as a specific case of just the brackets? If it's a relatively specific case of just brackets, you should be able to adapt String expansion script - I think that my solution in this thread is particularly well-suited to this special case, but you could say I'm biased. :-) Actually, more to the point is that I have a certain tool in my toolbox, and that influences how I see the problem: as a specific type of nail. Think of a callback like this:

my @possibilities = expand_string("A[CT]A[CT]", sub { split //, $_; });
Of course, you'd have to change expand_string to use brackets rather than parenthesis and braces as it does in that node.

For the absolute general case, I would have to say that * and + would kill you. Or at least kill whatever program tried to calculate it. So you'd have to define your minilanguage as a subset of regular expressions that did not include unlimited-length wildcards. Even using the "." character is painful - again, some definition would be required about the actual range of this - you probably don't want all of unicode.

But, it would be an interesting problem to solve - to see what type of limitations would need to be placed on the regular expression to allow for this to allow the regular expression to be solved in this way, and to see the actual solution.