On Thu, 1 Jun 2023 at 18:16, David Mertz, Ph.D. <david.mertz@gmail.com> wrote:
OK, fair enough. What about "has whitespace (including Unicode beyond ASCII)"?

>>> import re
>>> r = re.compile(r'\s', re.U)
>>> r.search('ab\u2002cd')
<re.Match object; span=(2, 3), match='\u2002'>

❯ py -m timeit -s "import re; r = re.compile(r'\s', re.U)" "r.search('ab\u2002cd')"
1000000 loops, best of 5: 262 nsec per loop

Paul