Possible what happens to
((?<!java:)[0-9]+)
- this, of course, is a coincidence at this point,
java: ^
fails but then at this point
java:4 ^
succeeds, because indeed, ava:4 not java:
You just need to add another negative lookbehind,
((?<!java:)(?<![0-9])[0-9]+) ^^^^^^^^^^
so only "full" numbers are taken into account.
source share