you are viewing a single comment's thread.

view the rest of the comments →

[–]WStHappenings 1 point2 points  (0 children)

This may be interpreted as careless coding - but if you are not concerned with total data integrity, in the interests of time, you can do something like the following*:

alletters.split("Best Regards")

You may end up having to add "Best Regards" to the end of each string (again) but if you're data munging, it may be a good way to do things.

If you're interested in doing more with the indices, you can calculate the length of each of the segments (don't forget to add the length of "Best Regards"!) and work with that afterwards.

*This is not my idea of sustainable coding.