I want to extract multiple strings from one string based on certain regex.
Example:
Input String :
20140909 Sample String 1 TRAINING COMPLETE useless string TRAINING COMPLETE useless string 2 TRAINING COMPLETE useless string 2 TRAINING COMPLETE 20120206 sample string 2 TRAINING COMPLETE
I want to extract the strings between the date string and TRAINING COMPLETE string.
Expected Output of Above String is following two strings
20140909 Sample String 1 TRAINING COMPLETE
20120206 Sample String 2 TRAINING COMPLETE
Regex I am using: (\d{8})(.*?)TRAINING COMPLETE But this gives only the first required string, I want all the required strings.