async function handleBumpVersionWithRegExp(outfile, label, options) {
    outfile = resolve(outfile);

    const bckfile = `${outfile}~`;

    await rename(outfile, bckfile);

    try {
        const rl = readline.createInterface({
            input: createReadStream(bckfile),
        });

        let newVersion = null;

        const writeStream = createWriteStream(outfile, { encoding: 'utf8' });

        rl.on('line', (line) => {
            const found = line.match(options.key);

            if (found) {
                const groups      = (found.groups ?? {});
                const oldVersion  = (groups.build ?? groups.version ?? found[1] ?? found[0]);
                const newVersion  = createVersionNumber(options.format, oldVersion);
                const replacement = found[0].replace(oldVersion, newVersion);

                line = line.replace(found[0], replacement);
            }

            writeStream.write(line + "\n");
        });

        await events.once(rl, 'close');

        await rm(bckfile);
    } catch (err) {
        await rm(outfile, { force: true });

        await rename(bckfile, outfile);

        throw err;
    }
}
Changes the version number for the provided RegExp in file.

@async
@param  {string} outfile
@param  {string} label
@param  {object} options
@param  {RegExp} options.key
@return {Promise}