View Single Post
Old 05-21-2015, 11:49 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
How does this look? (EDIT: fixed unescaped brackets)

Code:
\[(?P<author>[^\]]+)\] (?P<title>[^\]]+) \[(?P<tags>.+)\]
Matches:
Code:
[author_fn author_ln (optional_pseudonym)] title [tag1, tag2]
It assumes there MUST be a tag(s), but that can be made optional. Also, I don't know how you handle pseudonyms, but you cannot use custom columns in an Add regex so I just matched the pseudonym in with the author name. You can fix that manually later.


More about regex, if you are interested: http://regular-expressions.info

Last edited by eschwartz; 06-10-2015 at 10:12 PM. Reason: dur....
eschwartz is offline   Reply With Quote