From 222d85f0521a77daadf189502cb68fe6adee19d0 Mon Sep 17 00:00:00 2001
From: Philip Sargent <philip.sargent@klebos.com>
Date: Thu, 18 Jun 2020 10:59:11 +0100
Subject: [PATCH] regex deprecation warning

---
 parsers/survex.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/parsers/survex.py b/parsers/survex.py
index 9664618..508ab26 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -133,7 +133,7 @@ rx_comment = re.compile(r"([^;]*?)\s*(?:;\s*(.*))?\n?$")
 rx_ref     = re.compile(r'.*?ref.*?(\d+)\s*#\s*(X)?\s*(\d+)')
 rx_star    = re.compile(r'\s*\*[\s,]*(\w+)\s*(.*?)\s*(?:;.*)?$')
 # years from 1960 to 2039
-rx_starref = re.compile(r'^\s*\*ref[\s.:]*((?:19[6789]\d)|(?:20[0123]\d))\s*#?\s*(X)?\s*(.*?\d+.*?)$(?i)')
+rx_starref = re.compile(r'(?i)^\s*\*ref[\s.:]*((?:19[6789]\d)|(?:20[0123]\d))\s*#?\s*(X)?\s*(.*?\d+.*?)$')
 # rx_starref = re.compile("""?x   # VERBOSE mode - can't get this to work
 # ^\s*\*ref       # look for *ref at start of line
 # [\s.:]*         # some spaces, stops or colons
@@ -143,8 +143,8 @@ rx_starref = re.compile(r'^\s*\*ref[\s.:]*((?:19[6789]\d)|(?:20[0123]\d))\s*#?\s
 # ?\s*(.*?\d+.*?) # maybe a space, then at least one digit in the string - captured
 # $(?i)""", re.X) # the end  (do the whole thing case insensitively)
 
-rx_team    = re.compile(r"(Insts|Notes|Tape|Dog|Useless|Pics|Helper|Disto|Consultant)\s+(.*)$(?i)")
-rx_team_member        = re.compile(r" and | / |, | & | \+ |^both$|^none$(?i)")
+rx_team    = re.compile(r"(?i)(Insts|Notes|Tape|Dog|Useless|Pics|Helper|Disto|Consultant)\s+(.*)$")
+rx_team_member        = re.compile(r"(?i) and | / |, | & | \+ |^both$|^none$")
 rx_qm      = re.compile(r'^\s*QM(\d)\s+?([a-dA-DxX])\s+([\w\-]+)\.(\d+)\s+(([\w\-]+)\.(\d+)|\-)\s+(.+)$')
 
 insp = ""