此regexp匹配/ab之后的字符串.另外,我希望匹配/ab之后的空字符串.我怎么能做到这一点呢?先谢谢你.
const TelegramBot = require('node-telegram-bot-api');
const token = process.env.TOKEN;
const bot = new TelegramBot(token, { polling: true });
bot.onText(/\/ab (.+)/, (msg, match) => {
const chatId = msg.chat.id
const prompt = match[1]
bot.sendMessage(chatId, prompt)
})