From b1ab47fa7568cba2c358cd14bbe1e68f13449be4 Mon Sep 17 00:00:00 2001 From: "Kevin Z. Zhu" <86268612+KZhu-ME@users.noreply.github.com> Date: Tue, 2 Nov 2021 17:47:59 -0700 Subject: Change regex string to raw string (#2519) --- Python/pywarpx/picmi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pywarpx/picmi.py') diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index ef2371699..741ae6e6e 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -61,7 +61,7 @@ class Species(picmistandard.PICMI_Species): else: self.charge = self.charge_state*constants.q_e # Match a string of the format '#nXx', with the '#n' optional isotope number. - m = re.match('(?P#[\d+])*(?P[A-Za-z]+)', self.particle_type) + m = re.match(r'(?P#[\d+])*(?P[A-Za-z]+)', self.particle_type) if m is not None: element = periodictable.elements.symbol(m['sym']) if m['iso'] is not None: -- cgit v1.2.3