I am trying to create a regex that does not match a word (a-z only) if the word has a :
on the end but otherwise matches it. However, this word is in the middle of a larger regex and so I (don't think) you can use a negative lookbehind and the $
metacharacter.
I tried this negative lookahead instead:
([a-z]+)(?!:)
but this test case
example:
just matches to
exampl
instead of failing.