From b7fb4df4a8717517111c2bac175c0a29a3ddee43 Mon Sep 17 00:00:00 2001 From: Anson Date: Fri, 22 Mar 2019 12:37:43 -0700 Subject: [PATCH] gave regex for tickers a variable #13 --- bot/stockBot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/stockBot.py b/bot/stockBot.py index 5ec6eae..218f74a 100644 --- a/bot/stockBot.py +++ b/bot/stockBot.py @@ -129,7 +129,7 @@ def dividend(bot, update): chat_id = update.message.chat_id try: # regex to find tickers in messages, looks for up to 4 word characters following a dollar sign and captures the 4 word characters - tickers = re.findall("[$](\w{1,4})", message) + tickers = re.findall(TICKER_REGEX, message) bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING) for ticker in tickers: