From 4e349fdf5fc6d29baf76075733fec9dcec99bdad Mon Sep 17 00:00:00 2001 From: Roman Isko Date: Mon, 17 Oct 2016 23:13:08 +0300 Subject: [PATCH] use RegExp object to define regular expression According to [comment in issue 129](https://github.com/Naltox/telegram-node-bot/issues/129#issuecomment-252519064) the RegExp object rather than a string should be used for RegexpCommand --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6408184..dd4117e 100755 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ tg.router ```js tg.router .when( - new RegexpCommand(/test/g, 'testHandler'), + new RegexpCommand(new RegExp(/test/, 'g'), 'testHandler'), new TestController() ) ```