Re: Searching for words in a specific location

2002-02-28 Thread Steven M. Klass
Hi all, That only seems to grab the first one. I also have comments(denoted by * foobar) and white space lines, and other .BAR where .BAR is any number of things I want to ignore. sub GetSchCellName { my ($SchCell, $strName, @SchCells, %seen); my $SchDesign = $_[0]; print ".. Examinin

Re: Searching for words in a specific location

2002-02-28 Thread Jeff 'japhy' Pinyan
On Feb 28, Jeff 'japhy' Pinyan said: >And then extracting the first chunk of non-whitespace after ".SUBCKT": > > push @names, /^\.SUBCKT\s+(\S+)/; Sorry, that regex should have an /m modifier on it. push @names, /^\.SUBCKT\s+(\S+)/m; >} > } > close FILE; -- Jeff "japhy" Pinyan

Re: Searching for words in a specific location

2002-02-28 Thread Jeff 'japhy' Pinyan
On Feb 28, Steven M. Klass said: >I want to create an array of names I don't yet know. Basically I have a >text file that does this > >.SUBCKT FOO blah blah >blah >blah >.ENDS > >.SUBCKT BAR blah blah >blah >blah >.ENDS > >I want my array to capture FOO BAR I'd suggest using "\n.ENDS\n" as yo

Searching for words in a specific location

2002-02-28 Thread Steven M. Klass
Hi all I want to create an array of names I don't yet know. Basically I have a text file that does this ..SUBCKT FOO blah blah blah blah ..ENDS ..SUBCKT BAR blah blah blah blah ..ENDS I want my array to capture FOO BAR I am not sure how to do this.. Thanks so much -- Steven