User:Ohconfucius/script/formatgeneral.js: Difference between revisions

Content deleted Content added
more precise
No edit summary
Line 716:
regex(/\[\[Y([^\]\|]*)\|(y)\1([^-\] ]*|)(\]\])/g, '[[$2$1$4$3');
regex(/\[\[Z([^\]\|]*)\|(z)\1([^-\] ]*|)(\]\])/g, '[[$2$1$4$3');
regex(/\[\[([^\]\|]*)\|\1([^-\] ]*|)(\]\])/gi, '[[$1$3$2'); //per WP:PIPE and WP:REDIRECT
regex(/\[\[([^\[\]\(\)\|:]*)( \((?:\d{4} |)film\))(\]\])/gi, '\'\'[[$1$2|$1$3\'\'');
regex(/\[\[([^\[\]\(\)\|:]*)( \([^\[\]\(\)\|]*(?:album|film|magazine|newspaper|song|\bEP)\))(\]\])/g, '[[$1$2|$1$3'); //adding piping to album|film|magazine dabbed by parentheticals