I have an input string like this:
one `two three` four five `six` seven
where some parts can be wrapped by grave accent character (`).
I want to match only these parts which are not wrapped by it, it is one
, four five
and seven
in example (skip two three
and six
).
I tryied to do it using lookaheads ((?<=)
and (?=)
) but it recognised four five
group like two three
and six
. Is it possible to solve this problem using regex only, or I have to do it programmatically? (I'm using java 1.8)