So the reason why it was not exposed is that RegexpQuery doesn't expose the term.
I added the getters to Lucene here: https://github.com/apache/lucene-solr/commit/682b179605bace3f2ebec8b55517463906cc249d but it wasn't backported.