in reply to Parsing SNMP VLAN-numbers

If you using snmpget, you can specify an option -Oqv, in this case you'll get only value of oid(1,2,10,1002,1003).
And of course take a look at the span, the simplest way to make a things.