Build, test, and debug regular expressions
Matches everything from the start of a line up to (but not including) the last space, using a greedy dot-star followed by a positive lookahead. With the global and multiline flags, replacing each match with an empty string strips any leading text before the final token, such as removing ticket prefixes like 'A/5' from 'A/5 21171' in the Titanic Kaggle dataset to isolate the numeric part. Useful for data cleaning where the last token of each line must be kept.