Hey Jen: This may not be the cleanest way, but you can
setup a regex for each string type you're interested
in and push the results into an array...

If you're running Unix, it may REALLY help you to go
ahead and strip out all of the unwanted crap via a
command-line grep, then pipe the results into a file.
This will make your perl scripting much easier and
less of a headache. You can really focus on the
pattern matches. 

Off the top, something like:

shell-prompt$ grep 'script_id(NNNNN)' *\.nasl >>
grep_results.txt 

Then you can really hit the regex hard with a clean
list of EXACTLY the data you want to manipulate.

A regex like: /script_id\((\d{5})\)/ looks like it
would work for the script_id(NNNNN) variation below.
The value would then be in the special perl variable
$1 for you to use, probably to push onto an array or
build a hash. Hope this helps or gives you another
angle of attack. 

~Matt 



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to