[issue38582] Regular match overflow

2019-10-24 Thread Ma Lin
Ma Lin added the comment: An simpler reproduce code: ``` import re NUM = 99 # items = [ '(001)', '(002)', '(003)', ..., '(NUM)'] items = [r'(%03d)' % i for i in range(1, 1+NUM)] pattern = '|'.join(items) # repl = '\1\2\3...\NUM' temp = ('\\' + str(i) for i in range(1, 1+NUM)) repl = ''.join

[issue38582] Regular match overflow

2019-10-24 Thread Ma Lin
Change by Ma Lin : -- nosy: +Ma Lin type: security -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue38582] Regular match overflow

2019-10-24 Thread veaba
New submission from veaba <908662...@qq.com>: Regular match overflow code: ```python import re # list => str def list_to_str(str_list, code=""): if isinstance(str_list, list): return code.join(str_list) else: return '' def fn_parse_code(list_str, text): code_text_str='