https://bugzilla.wikimedia.org/show_bug.cgi?id=15406
--- Comment #17 from Steve Sanbeg <[email protected]> 2009-01-23 20:52:13 UTC --- (In reply to comment #16) > (In reply to comment #15) > > (In reply to comment #14) > > > Should the regex be anchored? I think something like > > > var sortClass = ('' + td.className + '').match(/^sort-\w+$/); > > > > > > would be more appropriate > > > > > Oops, that would probably break multiple classes.... > > You just made me notice that the quotes are supposed to have spaces in them. > I.e. > > - var sortClass = ('' + td.className + '').match(/(sort\-\w+)/); > + var sortClass = (' ' + td.className + ' ').match(/(sort\-\w+)/); > > -Mike > Then should the regex have the spaces, too? i.e. var sortClass = (' ' + td.className + ' ').match(/ (sort\-\w+) /); It seems like that should avoid false positives in the match. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
