whatmp3 icon indicating copy to clipboard operation
whatmp3 copied to clipboard

Convert string literal to regex

Open erichlf opened this issue 5 months ago • 0 comments

When attempting to run whatmp3 with python 3.12, I received the errors

/usr/bin/whatmp3:239: SyntaxWarning: invalid escape sequence '\S' t = re.sub('\S.+?=', '', os.popen(tagcmd).read().rstrip(), count=1) /usr/bin/whatmp3:249: SyntaxWarning: invalid escape sequence '.' outname = re.sub(re.compile('.flac$', re.IGNORECASE), '', outname)

The regular expressions were represented using string literals and so the escape sequences were invalid. Converting the strings to regex fixes this issue.

erichlf avatar Sep 21 '24 07:09 erichlf