dmgerman / ninka

a license identification tool for Source Code
http://ninka.turingmachine.org
GNU General Public License v2.0
103 stars 30 forks source link

Fix regular expression in SentenceExtractor #41

Closed rillig closed 2 years ago

rillig commented 6 years ago

When starting ninka, the following message was printed:

  Unescaped left brace in regex is deprecated here   (and will be fatal in Perl 5.30), passed through in regex;   marked by <-- HERE in m/^\s[0-9]{ <-- HERE 1-2}+\s[-)]/   at Ninka/SentenceExtractor.pm line 117.

iynehz commented 6 years ago

I also see this issue on my Perl 5.26. I just have one question here, what does ^\s*[0-9]{1-2}+\s*[\-\)] try to match, and why is there that + character? If it originally meant [0-9]{1,2}+ then that + should be useless. Or is that an issue from the very beginning?

rillig commented 6 years ago

@stphnlyd The + is a possessive quantifier.

iynehz commented 6 years ago

@rillig Thanks, this improves my knowledge.

rillig commented 2 years ago

@dmgerman Are you interested in merging this pull request? Otherwise I'll delete it.