Yes, you do have to account for all the characters in your regex. It might be simpler just to split on the delimiters, though:
echo '[part1-date] log - [..part2..] [..part3..] part4' | perl -ne 'my + @r = split (/[[\]]/, $_); print @r[1,3,6];'
In reply to Re: RegEX Doubt
by hippo
in thread RegEX Doubt
by sandy105
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |