in reply to regex remove blank/whitespace until first occurrence of specific character "["

Have a look at the /m and /g switches (perlre): my @matches = $initialStr=~/^\s*\[.+?\]\s*(.+)$/mg;

Replies are listed 'Best First'.
Re^2: regex remove blank/whitespace until first occurrence of specific character "["
by thanos1983 (Parson) on Mar 03, 2015 at 09:07 UTC

    Hello Anonymous Monk,

    Sometimes it is so simple, and I am thinking so complicated. Thanks a lot for your time and effort it works liek a charm. :D

    Seeking for Perl wisdom...on the process of learning...not there...yet!