I want to extract the string between the two words (start, end) in a text file but want to start extraction after 2nd occurrence of start till end.
For example, my text is
test.text <- c("During the year new factories at Haridwar for LV apparatus and at Bangalore for LV electric motors commenced production. Further increases in range and LV switchgear capacity augmentation are planned for motors, HT motors, Drives and .")
I need to start extracting text after the second "LV" (ignore the one which comes later) (case insensitive) till "capacity".
Output should be like:
electric motors commenced production. Further increases in range and
electric motors commenced production. Further increases in range and LV switchgear?