Match a string not preceded by a pattern

2 weeks ago 11
ARTICLE AD BOX

I want to match a string according to a pattern but only when it is not preceeded by an other pattern.


const source = "abc.def.Ghi\n\ @:test(abc.def.Ghi2)"; const re = /(?!\()([a-z]\w+\.)+([A-Z]\w*)/g; console.log(source.match(re));

This is what I've tried, but as you can see it is still matched. How to fix this?

Read Entire Article