summaryrefslogtreecommitdiff
path: root/src/app.js
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-07 21:58:59 +0000
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-07 21:58:59 +0000
commita3c751d3f1fe4030d514be4db90d577499d0bd85 (patch)
tree21d2a7b6a7786041c1e0fe413da8dc4cbffb3160 /src/app.js
parentd8287337edf14e507bcab31b91607133aff20b50 (diff)
global regexp
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/app.js b/src/app.js
index e363916..0e88902 100644
--- a/src/app.js
+++ b/src/app.js
@@ -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();