Re: gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Bruno Haible
Hi Collin, > > Oh, this means that r'[x\$]' contains dollar and backslash, whereas the > > programmer might have thought that it contains only the dollar? Indeed, > > it's worth to listen to these warnings! > > I don't think it changes the meaning: > > import re > re.match(r'[x$]*', 'x\\

Re: gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Collin Funk
On 4/11/24 12:25 PM, Bruno Haible wrote: > Oh, this means that r'[x\$]' contains dollar and backslash, whereas the > programmer might have thought that it contains only the dollar? Indeed, > it's worth to listen to these warnings! I don't think it changes the meaning: import re re.match(r

Re: gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Bruno Haible
Hi Collin, > I decided to try PyCharm again since I remember liking it when I used > it ~1 year ago. It seems that it has pretty good warnings for regular > expressions. Both patches applied; thanks. > Patch 0002 removes some redundant backslashing. I am pretty sure most > of these were introduc

gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Collin Funk
...]' set. And in the set the special characters have their special meaning dropped, so there is no need to backslash them. CollinFrom 5069a4633590a6f165c2ec650682c26d8db578b0 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 11 Apr 2024 11:00:47 -0700 Subject: [PATCH 1/2] gnulib-tool.py: