This regex (abc)(?!123) matches nothing in abc123
(abc)(?!123)
abc123
While this regex ([a-z]+)(?!123) matches ab
([a-z]+)(?!123)