we got some content like this:
state 1rd court house, state state 2nd court house
what we want is state xxx court house
we have try lookahead/lookbehind like this:
(?=state).*?(?<=court house)
but this regex extract aab
like content just like ab
kind content
how can i extract only ab
from a string like aab
which means start with something, but the capture content do not contains it
update
sorry for the poor description
what i want to match is
state 1rd court house
andstate 2nd court house
and not matchstate state 2nd court house
?which means if
state state 2nd court house
i'd like extract the rear partstate 2nd court house
ignore the firststate
appear in the content.