diff --git a/gromacs/fileformats/mdp.py b/gromacs/fileformats/mdp.py index e14a2b94..01c93c5e 100644 --- a/gromacs/fileformats/mdp.py +++ b/gromacs/fileformats/mdp.py @@ -58,7 +58,7 @@ class MDP(odict, utilities.FileUtils): COMMENT = re.compile("""\s*;\s*(?P.*)""") # eat initial ws # see regex in cbook.edit_mdp() PARAMETER = re.compile( - """ + r""" \s*(?P[^=]+?)\s*=\s* # parameter (ws-stripped), before '=' (?P[^;]*) # value (stop before comment=;) (?P\s*;.*)? # optional comment diff --git a/gromacs/fileformats/ndx.py b/gromacs/fileformats/ndx.py index 4356a4f2..8bea2546 100644 --- a/gromacs/fileformats/ndx.py +++ b/gromacs/fileformats/ndx.py @@ -82,7 +82,7 @@ class NDX(odict, utilities.FileUtils): default_extension = "ndx" # match: [ index_groupname ] - SECTION = re.compile("""\s*\[\s*(?P\S.*\S)\s*\]\s*""") + SECTION = re.compile(r"""\s*\[\s*(?P\S.*\S)\s*\]\s*""") #: standard ndx file format: 15 columns ncol = 15 diff --git a/gromacs/fileformats/xpm.py b/gromacs/fileformats/xpm.py index 3386cbb8..a60bd04d 100644 --- a/gromacs/fileformats/xpm.py +++ b/gromacs/fileformats/xpm.py @@ -115,7 +115,7 @@ class XPM(utilities.FileUtils): #: #: .. _`printable ASCII character`: http://www.danshort.com/ASCIImap/indexhex.htm COLOUR = re.compile( - """\ + r""" ^.*" # start with quotation mark (?P[\x20-\x7E])# printable ASCII symbol used in the actual pixmap: 'space' to '~' \s+ # white-space separated