this might do it:


$file="SUBCKT JTJTAG Z\@\@793 Z\@\@753 Z\@\@109 Z\@\@86 Z\@\@15 Z\@\@296
Z\@\@61 Z\@\@207 Z\@\@135
+ Z\@\@275 Z\@\@313 Z\@\@1134 Z\@\@232 Z\@\@184 Z\@\@162 Z\@\@976 Z\@\@1014
Z\@\@253 Z\@\@954
Z\@\@39";

$node="Z\@\@323";

if ($file=~/$node/){
        print "found\n";
} else {
        print "not found\n";
}


-----Original Message-----
From: Qiang Qiang [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 1:46 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: To read from a file using RegExp


I have a file as follows:

.SUBCKT JTJTAG Z@@793 Z@@753 Z@@109 Z@@86 Z@@15 Z@@296 Z@@61 Z@@207 Z@@135
+ Z@@275 Z@@313 Z@@1134 Z@@232 Z@@184 Z@@162 Z@@976 Z@@1014 Z@@253 Z@@954
Z@@39
+  Z@@138 Z@@622 Z@@1060 Z@@405 Z@@368 Z@@735

"Z@@xxx" stands for a node.

What I need to do is that read every node in the file and compare everyone
with a given node to see whether it is in this file.  What can I do using
RegExp?  Thanks:-)


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to