Extract binary data from text string. Like Perl pack, not just regexp
Something that does both simple matches, and converts data to binary
  return values on the fly.


You are describing sscanf(). It is way less powerful than
regexps when it comes to pattern matching, but it seems to closely match
your requirements.

Dummy example:

const int FORMAT_COUNT = 2;
const char * formats[FORMAT_COUNT] = {
    "c,%*x,%lx,%lx,%lx",  // first data logger
    "%lu %lu %lu"         // second data logger
};

// Here goes the data.
unsigned long channels[3];

// Try to parse using all the known formats.
void parse(const char *message)
{
    for (int i = 0; i &lt; FORMAT_COUNT; i++) {
        int ret = sscanf(message, formats[i],
                &amp;channels[0], &amp;channels[1], &amp;channels[2]);
        if (ret == 3) {
            Serial.print("Message \"");
            Serial.print(message);
            Serial.print("\" matched with format \"");
            Serial.print(formats[i]);
            Serial.println("\"");
            return;
        }
    }
    Serial.println("Could not parse message.");
}


Sample output:

Message "c,03,1234,5678,9ABC" matched with format "c,%*x,%lx,%lx,%lx"
Message "2342 1313 234236" matched with format "%lu %lu %lu"