in reply to regex to match the following

perl -nle 'm/type="stored-procedure"/ and m/id="([^"]+)"/ and print "$ +1"' {input_file}