BUG: fix regex to avoid DoS (#2597)
BUG: fix regex to avoid DoS (#2597)

* BUG: fix regex to avoid DoS

* BUG: fix regex to avoid DoS

A parenthesis is added to the repaired regular, so the group should be adjusted accordingly

* Revert "BUG: fix regex to avoid DoS"

This reverts commit 2390f936631e5efac57745f147f11310cfa45681.

* Bug: fix vulnerable regex to avoid potential ReDoS

* BUG: fix regex to avoid ReDoS

Co-authored-by: yeting li <liyt.ios.ac.cn>
Co-authored-by: Steven Bird <612c1b51fda3c83b69edcc4f47abf91ffce15867@gmail.com>
nltk/nltk,nltk/nltk,nltk/nltk