Changes between Version 1 and Version 2 of Ticket #32319, comment 25


Ignore:
Timestamp:
Jun 23, 2024, 9:15:39 AM (3 months ago)
Author:
Michael

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32319, comment 25

    v1 v2  
     1Thank for fixing the issue, I just came across a mistake in the regex I posted above:
     2{{{
     3(
     4                r"""(?P<matched>(?P<import_as>import\s*\*as\s\S)+\s+from\s*["'](?P<url>[./].*?)["']\s*;)""",
     5                """%(import_as)s from "%(url)s";""",
     6            ),
     7}}}
     8Should be (the plus should be for one of more chars of the import as name, not groups, so the plus moved one char to the left:
     9{{{
     10(
     11                r"""(?P<matched>(?P<import_as>import\s*\*as\s\S+)\s+from\s*["'](?P<url>[./].*?)["']\s*;)""",
     12                """%(import_as)s from "%(url)s";""",
     13            ),
     14}}}
Back to Top