DonationCoder.com Software > Finished Programs
DONE: Regex Sorter
Shardnax:
I maintain the master list and help with maintaining the master list of threads on some sites, alphabetizing them is probably the most troublesome thing to do, on with my request:
What I'm looking for is a text editor like notepad, or an external program to alphabetize text files based on the name that is contained in the brackets of a url tag in BBCode.
Thread Title
*url=http://www.examplesite.com/showthread.php?t=thread]Thread Title 2[/url*
If I posted this incorrectly please tell me, and how I can fix it. Many thanks to anyone that decides to pick up this request.
timns:
Doesn't sound too bad at all - if no-one picks this up by March 28th, I'll do this one.
How I would do this: a bit of Java that reads a file and applies a regex to find the sort criteria in each line.
Say something like the following: ^.*?=thread\](.*?)\[.*?$
Sort on \1
Rewrite
This would actually be very easy to make configurable, possibly quite handy for other uses.
Shardnax:
Doesn't sound too bad at all - if no-one picks this up by March 28th, I'll do this one.
How I would do this: a bit of Java that reads a file and applies a regex to find the sort criteria in each line.
Say something like the following: ^.*?=thread\](.*?)\[.*?$
Sort on \1
Rewrite
This would actually be very easy to make configurable, possibly quite handy for other uses.
-timns (March 16, 2011, 11:57 AM)
--- End quote ---
Feel free to add extra functionality as you want, all I want is the url sorting :P. Thanks for offering so quickly.
skwire:
I have this pretty much done. Would you mind providing a list of valid URLs and your expected sorting of them for testing purposes? If they're sensitive links, feel free to PM the list.
timns:
skwire, is it a general solution? Since I can think of a couple of uses for this sort of sorting. If it's specific to sorting URLs I may still have a crack at it later.
Navigation
[0] Message Index
[#] Next page
Go to full version