I’m trying to extract some fields from a fixed format data, which looks like this:
G1 = DFF(G2)
Say $_ has the above line, and I want to get G1 and G2 after matching it with a suitable reg exp. I’m using this :
if (/(w+)\s*=\s*DFF\((w+)\)/)
{
print "$1, $2";
}
But this isn’t printing what I want (prints nothing, which means my pattern is wrong). Can anyone show me what I’m doing wrong (pls be patient, this is my first perl program !!)
It’s not the parens that are incorrect, it’s the word match
\wthat needs an escape.