• You also need to ensure that 'between', 'and' and '(' cannot appear in the text you are trying to extract.

    I'd suggest doing this in stages to facilitate future maintenance.

    Definitely as has already been suggested obtain the string indices first - then check in case those terminators are not present.

    If there can be more than one instance then you probably will find it easier to follow the code if you store intermediate substrings in some working variables. That way you can look for the first or last instance of each and discard anything before the first or after the last.

    e.g. you go from

    Collapsed Statue: Matured Life # 007812 between BOKSAM KAND LAMOG and Bill APPER SRIM (Goper)

    everything after first 'between '

    BOKSAM KAND LAMOG and Bill APPER SRIM (Goper)

    everything before last ' ('

    BOKSAM KAND LAMOG and Bill APPER SRIM

    now you just need to worry about the ' and ' - how you handle that will depend whether ' and ' can appear in either string.

    If it can appear in the first section but not the second take everything before the last ' and ' and everything after the last one.

    If it can appear in the secondsection but not the first take everything before the first ' and ' and everything after the first one.

    If it can't appear in either - use whichever of the above is easier.

    If it can appear in both you will need to find some other way to identify the text you want..