regex or string manipulation, your other option is...
# general
a
regex or string manipulation, your other option is to have a custom field on the PO that store the state of the vendor...