in reply to Parsing a Word placed between special characters

use warnings; use strict; while (<DATA>) { print "$1\n" if /\\\[(\w+)\\]/; } __DATA__ test\[abc\]test test\[cde\]test test\[ack\]test