How to parse a complex string using jQuery Tablesorter plugin ?
Posted
by
Anth0
on Stack Overflow
See other posts from Stack Overflow
or by Anth0
Published on 2010-12-27T10:08:40Z
Indexed on
2010/12/27
13:54 UTC
Read the original article
Hit count: 248
I have a table like this I'd like to sort :
| Name | Case |
| John | X-123/08 P|
| Bob | X-123/09 |
| Dylan | X-45/10 |
I want to sort the Case colum by case's year then case's number knowing that the format is always "X-(1 to 4 digits for case's number)/(case's year on 2 digits) (sometimes some text)". It's possible that after the year's case I have some text but it shoud be ignored for sorting.
I am using tablesorter jQuery's plugin and I am struggling to add a custom parser for this.
Thanks for your help !
© Stack Overflow or respective owner