I don't think you can access user input from the regex-function mode, as it doesn't spawn a dialog box or other input method.
If you want to get one, I strongly suggest you write a plugin instead.
Why do you need to pass user input in a regex? Shouldn't all the information be inside the matched text?
(And if it isn't, again that means a plugin is a better scope for whatever you may be trying to do.)