diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-03-07 21:58:59 +0000 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-03-07 21:58:59 +0000 |
| commit | a3c751d3f1fe4030d514be4db90d577499d0bd85 (patch) | |
| tree | 21d2a7b6a7786041c1e0fe413da8dc4cbffb3160 | |
| parent | d8287337edf14e507bcab31b91607133aff20b50 (diff) | |
global regexp
| -rw-r--r-- | src/app.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -37,7 +37,7 @@ app.post('/sms', (req, res) => { sendTextMessage([senderSubscription], confirmationMessage); } else { if (body.toLocaleLowerCase().startsWith('my name is ') || body.toLocaleLowerCase().startsWith('my name is: ')) { - const senderName = body.matchAll(/^my name is:? (.*)$/)?.next()?.[1]; + const senderName = body.matchAll(/^my name is:? (.*)$/g)?.next()?.[1]; if (!senderName) { const twiml = new MessagingResponse(); |
