I am trying to match all occurences of the String Article
followed by a number (single or more digits) which are not followed by an opening parentheses. In Sublime Text, I am using the following regex:
Article\s[0-9]++(?!\()
to search the following String:
Article 29
Article 30(1)
which does not match Article 30(1)
(as I expect it to) but Article 29
and Article 1
.
When attempting to do the same in Python (3) using
import re
article_list = re.findall(r'Article\s[0-9]++(?!\()', "Article 30(1)")
I get an the following Error as I am using a (nested) possessive quantifier which is not supported by Python regex. Is there any way to match what I want it (not) to match in Python?