Creating a RegExp in JavaScript from user input
The else if block was pretty hard to follow.  I would say that your function has rather weird behaviour (treating the text as flags) if the input has a leading slash but no trailing slash.

Anyway, even if you are not very familiar with JavaScript, surely you are familiar with regular expressions?  Why not just use a regular expression to parse your regular expression?

function regGen(uInput) {
    var regExpParser = new RegExp("^/(.*)/(.*)|(.*)");
    var match = uInput.match(regExpParser);
    return new RegExp(match[1] || match[3], match[2]);
}


Strictly speaking, we should both be more careful about interpreting possible backslashes in the input, but that is rather tricky to do correctly.

I've taken out the alert(); a malformed expression would probably be better handled by the caller.