User talk:Rspeer/Wikipolitical Compass/Code

Latest comment: 17 years ago by Cryptic

^#[^:;#*] is less brittle than ^#\s*[A-Za-z'] for finding valid votes; it disallows only wikitext that changes list formatting, instead of requiring the first nonspace to be alphabetic or an apostrophe. At the very least, there's bound to be comments starting with linked text in the dataset.

\[\[User:([^/\]\|]*?)\| could, at the very least, stand to be expanded to \[\[User(?:[_ ])?:([^/\]\|]*?)[\]\|], to catch those who, like User:(aeropagitica), User:Tony Sidaway, and myself, link only to their talk pages, and those who leave their sigs unpiped like "--User:Example" (though I can't think of any examples for the latter offhand, I do run into them once in a while). The full regex I use for my suffrage-validator is \[\[User(?:[_ ]talk)?:([^]|/\#]+)/?(?:\|[^]]*)?\]\]|\{\{User:([^}|/]+)/sig}}|\{\{u(?:nsigned|ser)\|([^|}]*)(?:\|[^}]*)?}} (case-insensitive). —Cryptic 21:19, 9 May 2007 (UTC)Reply