Regex negative lookahead

I had a use case where I needed to extract article references from a text. The regex could be simple, because I already parsed as section dedicated to listing article references. The only problem I had, is that this section also contained a numbered section header in the free text.

E.g. a test string would look like this:

"10 Sectie naam. In deze sectie worden artikelen 10, 100a, en 400 aangehaald."

So I wanted to match 10, 100a, 400, but not the 10 at the beginning of the string. This can apparently be achieved with a negative lookahead (?!...), which ensures that the regex that comes after is not matched in some condition. In this case, we do not want to match when the match is at the beginning of the line ^, giving (?!^). (So to do the similar trick for the end of the string you can do a negative lookahead at the end of the regex with $) It was necessary to indicate the word boundary with \b, otherwise the negative lookahead will only work on the first digit. In this example, we do not want to match years such as 2007, so we also need a closing word boundary.

The resulting regex in Python was:

r'(?!^)\b\d{1,2}\w?\b' 

You can see the test regex here