User:Dr pda/persondata.js: Difference between revisions

Content deleted Content added
updating parameters to handle {{Infobox tennis biography}}
update to handle [md]f=yes in the middle of {{birth date and age}} instead of the end
Line 49:
//Remove references, birth/death date and age templates
template = template.replace(/<ref.*(\/ref>|$)/gm,'');
template = template.replace(/{{(?:[Bb]irth|[Dd]eath) date(?: and age)?\s?(\|\s?[md]f\s?=\s?ye?s?)?\|\s?(\d{1,4})\|\s?(\d{1,2})\|\s?(\d{1,2}).*}}/g,"$1-$2-$3-$4");
template = template.replace(/\[\[Image:Flag.*px\]\]/ig,'');
template = template.replace(/{{flagicon.*}}/ig,'');