Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: extract ids

by ccn (Vicar)
on Sep 16, 2009 at 07:10 UTC ( #795534=note: print w/replies, xml ) Need Help??

in reply to extract ids

What about this?
perl -lne 'print for /molecule_idref="([^"]+)/g' xmlfile

I've used 'g' modifier to catch ids in a case they occur more than one on a line.