in reply to regex needed

Your code doesn't show any attempts at matching , or you want what?

my( @this ) = $line =~ /$regex/gi; my @want = ( 'DATE', '_RE_IRD_Soc' ); Test::More::is_deeply( \@this, \@want, "got what I needed");

This ought to do

$regex = qr{ \$ \( ( [^\)]+ ) # $1 \) (.*) # $2 }xmi;

Death to Dot Star!