-1

With

(x)?xxx

https://regex101.com/r/MHCKZx/1

I get match xxx and xxxx with

test1xxxblah
test2xxxxblah

whereas I would like last xxx for test2xxxx

I'm really not proficient at regex I can't see what to use

user310291
  • 36,946
  • 82
  • 271
  • 487

1 Answers1

-1

Try this out:-

regex --> /xxx(?=[^x])/
RK_15
  • 929
  • 5
  • 11