Is there an algorithm that can "reverse engineer" a Regular Expression? Given a Regular language (represented as a black box to which one can apply inputs and get 0/1) Is there an algorithm that can find a finite deterministic automaton that produces that language?
 A: There is no such algorithm.  As an explicit example, imagine a black box that always says yes. How many inputs should this algorithm test before it concludes that the language contains all words? 
(NB: You write "given a language, is there an algorithm...".  I read this as "Is there an algorithm which, given a language, ...".)
A: Without additional assumptions there is no such algorithm. In finite time an alleged algorithm could only test for finitely many inputs, but since there are infinitely many regular languages which match any given finite number of test cases, the algorithm cannot work.
In machine learning this is a common situation (given these finitely many cases of a function, "learn" the function on the rest of infinitely many cases). You should look at machine learning literature, as this is what you are doing. For example, you could ask, what is the simplest regular expression which matches the given test cases?
And just to demonstrate that Google is not that hard to use, here is the first hit on "learn regular expression machine learning": Henning Fernau, Algorithms for Learning Regular Expressions (Extended Abstract).
A: You can only do that under 2 assumptions:


*

*You know ahead the lenght of the regular expression

*You can compare the execution tree of a black-box attemp with any previous attemp


As you know regular expressions are FSM.
By execution tree I mean the following:


*

*The machine enter a state and stay there some time (re-entering same state as many times it wish)

*Then enter another state and so on.

*Each execution tree is a tuple of N elements, and you can compare each element for equality with other elements of same or other tuples (necessary to detect loops).


Alternatively:


*

*You know ahead the lenght of the regular expression

*There are no loops in the FSM

