-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
  • 35,095
  • 76
  • 252
  • 458

1 Answers1

-1

Try this out:-

regex --> /xxx(?=[^x])/
RK_15
  • 905
  • 4
  • 10