Regexes are compile time constants because allowing them to be defined at runtime would mean regex compiling per document (ie possibly millions of regex compilations).
While it is not advised and should be used with care, especially with the very short prefix you are using, why not use the prefix query?