diff --git a/vxi11/vxi11.py b/vxi11/vxi11.py index 231582d..c7f4221 100644 --- a/vxi11/vxi11.py +++ b/vxi11/vxi11.py @@ -131,8 +131,8 @@ def parse_visa_resource_string(resource_string): # TCPIP0::10.0.0.1::gpib,5::INSTR # TCPIP0::10.0.0.1::usb0::INSTR # TCPIP0::10.0.0.1::usb0[1234::5678::MYSERIAL::0]::INSTR - m = re.match('^(?P(?PTCPIP)\d*)(::(?P[^\s:]+))' - '(::(?P[^\s:]+(\[.+\])?))?(::(?PINSTR))$', + m = re.match(r'^(?P(?PTCPIP)\d*)(::(?P[^\s:]+))' + r'(::(?P[^\s:]+(\[.+\])?))?(::(?PINSTR))$', resource_string, re.I) if m is not None: