This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ram
Recipients ezio.melotti, mrabarnett, ram, serhiy.storchaka
Date 2018-08-02.05:52:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Sample code below

import re

regex = r'DELETE\s*(?P<table_alias>[a-zA-z_0-9]*)\s*FROM\s*(?P<table_name>[a-zA-z_0-9]+)\s*([a-zA-Z0-9_]*)\s*(?P<where_statement>WHERE){0,1}(\s.)*?'

test_str = 'DELETE FROM my_table1 t_ WHERE id in (1,2,3)'

matches = re.finditer(regex, test_str, re.MULTILINE)

print([m.groupdict() for m in matches])

Below is the expected output.

[{'table_alias': '', 'table_name': 'my_table1', 'where_statement': 'WHERE'}]

But in Win Server 2012 R2, the output is
[{'table_alias': '', 'table_name': 'mytable1', 'where_statement': None}]

Using 3.7 in Win Server 2012 R2 also the output is not as expected. But in Win 10 and other linux variants, expected output is obtained.
Date User Action Args
2018-08-02 05:52:59ramsetrecipients: + ram, ezio.melotti, mrabarnett, serhiy.storchaka
2018-08-02 05:52:59ramsetmessageid: <>
2018-08-02 05:52:59ramlinkissue34315 messages
2018-08-02 05:52:59ramcreate