This question already has an answer here:
assume we have 4 strings:
1)
aa bb aa
2)
aa cc aa
3)
aa
bb
aa
4)
aa
cc
aa
I want to select only 1 and 3 to replace by php preg_replace.
After hours of googling I ended up with aa(?!.*cc).*aa
that selects only 1 . is there any way to select 1 and 3 together?
</div>