Switching to multiline mode ~/regex/m doesnt seem to be working. Ex file.txt: A1 {@ a d e \n a b c} A2 {@ 1 {2 3} \n a b c \n d e f}
I need to extract these separately : {@ a d e a b c } {@ 1 {2 3} \n a b c \n d e f} perl -lne 'print $1 if '~/^[A-Z0-9]+\s\{.*$/m' file.txt I can extract data by grouping after \{ in regex but how to span over multiple lines and make this work. Need pointers. iand -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/