Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: [RFC] Building Regex Alternations Dynamicallyby haukex (Archbishop) |
on May 14, 2017 at 11:56 UTC ( [id://1190259]=note: print w/replies, xml ) | Need Help?? |
So a standard reverse sort expression serves in all cases. As I /msg'ed you at the time you posted this, I had a doubt about this - and now I've finally found the time to confirm that I wasn't being entirely paranoid ;-) Under locale, it's possible for longer strings to be sorted before shorter ones. Here are the instructions to reproduce (on a Debian-based system):
Now edit the file en_TESTING and insert the following into the LC_COLLATE section after the copy "iso14651_t1" statement:
Now compile and test the locale:
Now of course the real locale definitions are long and I don't plan on reading all of them, and so it's entirely possible that currently no locales exist that define this kind of sorting order. But I'll just be a bit paranoid and stick with sorting by length explicitly :-) Update: I did incorporate your suggestion about highlighting the fact that strings are matched literally, thank you!
In Section
Meditations
|
|