this is the complete regex: ".*?(?=XY)(?<=(.|^))XY(?=(.|$))|.+". If I remove |^ or remove .| as follows: ".*?(?=XY)(?<=(.))XY(?=(.|$))|.+" ".*?(?=XY)(?<=(^))XY(?=(.|$))|.+" it will compile but the result is not correct. Please take a look. Thanks!
this is the complete regex: ".*?(?=XY)(?<=(.|^))XY(?=(.|$))|.+". If I remove |^ or remove .| as follows:
".?(?=XY)(?<=(.))XY(?=(.|$))|.+"
".?(?=XY)(?<=(^))XY(?=(.|$))|.+"
it will compile but the result is not correct.
Please take a look. Thanks!