in reply to Re: How do remove trailing data?
in thread How do remove trailing data?

Preferring split to a regex makes little sense to me (obviously, YMDV) unless benchmarking supports that choice (and in OP's case, any difference in execution time would presumably be un-noticeable).

Using split still requires the basic familiarity with a simple regex such as ahmad offered; is longer; and may require more than 'just a glance' to understand at some future date.
    ...but I agree that index, despite it's length and comparative complexity, may be a valuable alternative in the case stated by OP.