Tolgar
asked on
How to parse a text starting with a flag till another special flag?
How can I parse this in Perl?
This text can also be in this format:
AA: BB: CC: are the flags.
The expected output is:
The idea for this can be:
Parse everything that starts with AA: till (BB: or CC:)
How can I do that in Perl?
Thanks,
AA: something in here
and it continues in the next
and the third
and the n number of lines till the next flag
BB: some new text is here
CC: some other text is also here
This text can also be in this format:
BB: some new text is here
AA: something in here
and it continues in the next
and the third
and the n number of lines till the next flag
CC: some other text is also here
AA: BB: CC: are the flags.
The expected output is:
something in here
and it continues in the next
and the third
and the n number of lines till the next flag
The idea for this can be:
Parse everything that starts with AA: till (BB: or CC:)
How can I do that in Perl?
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
ASKER
Open in new window
Can I change it like this with your code in stead of new line character:
Open in new window
The thing that I wanna parse is in these formats:
Open in new window
or
Open in new window
or
Open in new window
The part that I wanna capture is:
Open in new window
Do you think it is ok?
Thanks,