I want to be able to get (LENGTH: .... ) into one array and so on... I'm trying to use PERL in slurp mode but for some reason I'm having trouble. I solved the problem using "read the file line by line" technique but I want to use the slurp mode to solve it because the input is something like this:LENGTH: Some Content here TEXT: Some Content Here COMMENT: Some Content Here
As you can observe, the data that I want is not limited to one line but rather spans multiple lines so thought using a regex over multiple lines would be better. Do you have any suggestion on how to solve this problem?LENGTH: ...................................................... .................................................................. .................................................................. ................................................................... .................................................................. SUBJECT: ....................................................... COMMENT: ..................................................... ....................................................................
In reply to I need to regex multiple lines by legend
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |