I have a table with a column of data that is mixed text and numbers. I'm sorting it using jQuery and the tablesorter plugin. The data that won't sort correctly is equipment tags, for example, "AHU-1", "AHU-2", "AHU-10". The problem is, given those example values, AHU-10 will be placed between AHU-1 and AHU-2. I've found forcing a 'digit' sort doesn't solve the problem.
Here's my question: 1) Does anyone know of an existing parser that I can use in this situation? If there isn't one then I'll need to write my own parser, in which case 2) How should I write the parser? Should I try and translate every letter to a number and do a numeric sort? That's my initial thought.
One more thing, I don't know for sure that a hyphen will be the delimiter. "AHU-1" could also be "AHU1", or "AHU 1", or "AHU:1", or something else.