> But any manual page (regexp(6), that of sam) keeps completely silent > about eg. any submatch tracking. > So what's wrong? Can anybody clarify the situation for me or do I > really have to read the codes?
well reading the code would be a travesty. it's curious that neither the sam paper nor regexp(6) mentions submatches. maybe i missed them. sed -n 's:.*(KRAK[A-Z]+*) +([a-zA-Z]+).*:\2, \1:gp' </lib/volcanoes sam -d /lib/volcanoes ,x g/KRAK/ s:[^A-Z]+([A-Z]+*) +([a-zA-Z]+).*:\2, \1: /KRAK/-+ or, if you want to run sam as a stream editor { echo ',x g/KRAK/ s:[^A-Z]+([A-Z]+*) +([a-zA-Z]+).*:\2, \1:' echo '/KRAK/-+' } | sam -d /lib/volcanoes >[2=] a couple of examples of submatch tracking from our system (i'm not sure about the version of iwhois on sources.) /rc/bin/B /rc/bin/Kill /rc/bin/broke /rc/bin/fax /rc/bin/fshalt /rc/bin/iwhois /rc/bin/juke - erik