The string is about 3k long. It contains a substring several times with the following specification:
1. First part is FIXED number of characters. The same for all the substrings.
2. Second part is the one to be extracted and stored in an array.It is of variable length
3. Third part is FIXED number of characters.
Part 1 & 3 contains all types of characters including special characters and regex metacharacters.
I am attaching sort of pesudo code just to summarize my problem
my @substringArray;
my $longString;
my $subStart="START";
my $subEnd = "END";
while (How to loop a string ???) {
push (@substringArray,/$subStart(\.*)$subEnd/);
}
say @substringArray;
I am attaching sort of pesudo code just to summarize my problem