Repository: opsdroid/opsdroid

Issue:
Add case-insensitive kwarg to the regex matcher
It would be nice to specify case insensitive matching in the regex matcher.

e.g
```python
@match_regex(r'myregex', case_sensitive=False)
async def myskill(opsdroid, config, message):
    pass
```


Discussion:

Resolving patch:
diff --git a/opsdroid/matchers.py b/opsdroid/matchers.py
--- a/opsdroid/matchers.py
+++ b/opsdroid/matchers.py
@@ -9,12 +9,14 @@
 _LOGGER = logging.getLogger(__name__)
 
 
-def match_regex(regex):
+def match_regex(regex, case_sensitive=True):
     """Return regex match decorator."""
     def matcher(func):
         """Add decorated function to skills list for regex matching."""
         opsdroid = get_opsdroid()
-        opsdroid.skills.append({"regex": regex, "skill": func,
+        opsdroid.skills.append({"regex": {"expression": regex,
+                                          "case_sensitive": case_sensitive},
+                                "skill": func,
                                 "config":
                                 opsdroid.loader.current_import_config})
         return func
diff --git a/opsdroid/parsers/regex.py b/opsdroid/parsers/regex.py
--- a/opsdroid/parsers/regex.py
+++ b/opsdroid/parsers/regex.py
@@ -15,7 +15,12 @@ async def parse_regex(opsdroid, message):
     # give a response to the user, so an error response should be given.
     for skill in opsdroid.skills:
         if "regex" in skill:
-            regex = re.match(skill["regex"], message.text)
+            if skill["regex"]["case_sensitive"]:
+                regex = re.match(skill["regex"]["expression"],
+                                 message.text)
+            else:
+                regex = re.match(skill["regex"]["expression"],
+                                 message.text, re.IGNORECASE)
             if regex:
                 message.regex = regex
                 try:
@@ -28,4 +33,4 @@ async def parse_regex(opsdroid, message):
                     _LOGGER.exception("Exception when parsing '" +
                                       message.text +
                                       "' against skill '" +
-                                      skill["regex"] + "'")
+                                      skill["regex"]["expression"] + "'")


Test patch:
diff --git a/tests/test_core.py b/tests/test_core.py
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -76,7 +76,7 @@ def test_load_regex_skill(self):
             decorator = match_regex(regex)
             decorator(skill)
             self.assertEqual(len(opsdroid.skills), 1)
-            self.assertEqual(opsdroid.skills[0]["regex"], regex)
+            self.assertEqual(opsdroid.skills[0]["regex"]["expression"], regex)
             self.assertIsInstance(opsdroid.skills[0]["skill"], mock.MagicMock)
 
     def test_start_databases(self):
@@ -142,7 +142,7 @@ class TestCoreAsync(asynctest.TestCase):
 
     async def test_parse_regex(self):
         with OpsDroid() as opsdroid:
-            regex = r".*"
+            regex = r"Hello .*"
             skill = amock.CoroutineMock()
             mock_connector = Connector({})
             decorator = match_regex(regex)
@@ -153,6 +153,19 @@ async def test_parse_regex(self):
                 await task
             self.assertTrue(skill.called)
 
+    async def test_parse_regex_insensitive(self):
+        with OpsDroid() as opsdroid:
+            regex = r"Hello .*"
+            skill = amock.CoroutineMock()
+            mock_connector = Connector({})
+            decorator = match_regex(regex, case_sensitive=False)
+            decorator(skill)
+            message = Message("HELLO world", "user", "default", mock_connector)
+            tasks = await opsdroid.parse(message)
+            for task in tasks:
+                await task
+            self.assertTrue(skill.called)
+
     async def test_parse_apiai(self):
         with OpsDroid() as opsdroid:
             opsdroid.config["parsers"] = [{"name": "apiai"}]
diff --git a/tests/test_matchers.py b/tests/test_matchers.py
--- a/tests/test_matchers.py
+++ b/tests/test_matchers.py
@@ -19,7 +19,7 @@ async def test_match_regex(self):
             decorator = matchers.match_regex(regex)
             decorator(mockedskill)
             self.assertEqual(len(opsdroid.skills), 1)
-            self.assertEqual(opsdroid.skills[0]["regex"], regex)
+            self.assertEqual(opsdroid.skills[0]["regex"]["expression"], regex)
             self.assertIsInstance(opsdroid.skills[0]["skill"], mock.MagicMock)
 
     async def test_match_apiai(self):