I am new with regex, could you help me to solve this?
I want to replace
Some text and XXblaaaaa# and text again XXbl!abla# or XXblalala# or XXbabla#
with
Some text and OOTEXT** and text again OOTEXT** or OOTEXT**
My regex for test is: /((XX).+?(?=(#)))/g;, i.e., find XX untill #.
But how can I set the following condition: untill # if string between XX and # does not contain !?
XXbl!abla# ordisappear from your string though?!you want to ignore the next#, instead of skipping the entireXX..!..#thing.