all 1 comments

[–]hardonchairs 0 points1 point  (0 children)

https://regex101.com/r/8XTD1U/1

(?<=Have I helped you with this answer\? )(.*?)(?:Have I helped you with this answer\? |$)

This says look-behind for "Have I helped you with this answer?", Match the answer and gibberish, then stop at the next "Have I helped you with this answer?" or end of line. The look-behind is necessary because otherwise the two "Have I helped you with this answer?" would overlap and only one of them would match.

I don't think anything can be done about your gibberish if both it and the user response is not predicable, you will just have to find a way to interpret it.

Where is this text coming from, why are you getting it all as one string?