Thanks, that does make sense, but does "break" the data driven approach I am trying to come up with...I have expanded the example and maybe someone will come up with a different idea...if not I'll do it the way suggested ;-)
$PRE = '\[\s*(';
$VALID1 = '[-a-zA-Z0-9_.* \t\n]';
$VALID2 = '[-a-z0-9_.*\n]';
$VALID3 = '[a-zA-Z]';
$VALID4 = '[-a-zA-Z0-9]';
$PST = ')\s*\]';
while (<DATA>)
{
s/\\n/\n/g; #Are these harmless if
s/\\t/\t/g; #not needed???
print "yep\n" if m/$PRE($VALID1+)$PST\s*
$PRE($VALID2+)$PST\s*
$PRE($VALID3+)$PST\s*
$PRE($VALID4+)$PST\s*
/x;
}
__DATA__
[TEST \n DATA] [ TEST DATA ] [ 2345423 ] [ TEST\tDATA ]\n
[TEST \n DATA] [ TEST DATA ] [ 2345423 ] [ TEST DATA ]\n
[TEST \n DATA] [ TEST DATA ] [ 2345423 ] [ TEST\tDATA ]\n
|