User talk:WindBOT/Filters

From Team Fortress Wiki
Jump to: navigation, search

Uber and Über

Time out here, you'll have to make sure it doesn't affect things like external links. Same goes for images unless you make it so that it moves them to the proper namespace at the same time. -- Vi3trice (talk) 15:08, 6 August 2010 (UTC)

It is all taken care of. :3 the wordFilter function wraps the regex inside more lookaround checks to see if it's not within a link. — Wind 15:22, 6 August 2010 (UTC)
To be more precise, the page's content is first filtered out of templates and links; then, filters are applied to this "clean" text, and then the templates and links are put back in. — Wind 15:25, 6 August 2010 (UTC)

Regex

I was good at regex once:

Find:                                                             Replace:

\[http://en.wikipedia.org/wiki/:*([^][<>"\s]+) ([^]]+)\]          [[:$1|$2]]
\b(?<!-)crit(ical)?(s)?\b                                         Crit$1$2
\bcritical hit(s?)\b                                              Critical hit$1
\bmini[ -]?crit(ical)?(s)?\b                                      Mini-crit$1$2
\b[Ss]entry([ _])[Gg]un\b                                         Sentry$1Gun

All case sensitive. I have a bunch more, as far as I know they all work perfectly. -- Pilk (talk) 22:28, 7 August 2010 (UTC)

Nice! I believe Wind said we could add things ourselves, so you should whack them in yourself. -- Smashman... (ts) 22:33, 7 August 2010 (UTC)