Content deleted Content added
Ohconfucius (talk | contribs) rem pipe trick - not functioning within citations |
Ohconfucius (talk | contribs) allign to test script (ref names function) |
||
Line 587:
function ohc_ref_names() {
// give names to citations in templates that are without names
regex(/<ref>((?:[^<>]*\|\s*url\s*=|[\[\s]?)https?:\/\/(?:[^|</]+\.)*(\w+)\.(?:(?:com?|org|net|gov|ac)(?:\.[a-z]{2}|))\/[^<>|{}
regex(/<ref>((?:[^<>]*\|\s*url\s*=|[\[\s]?)https?:\/\/(?:[^|</]+\.)*([-\w]+)(?:\.[a-z]{2})\/[^<>|{}\d]*(\d{6,12})[^<>]*)(?=<\/ref>)/gi, "<ref name=$2$3>$1"); //urls with non-date serial numbers
ohc_regex(/<ref>((?:[^<>]*\|\s*url\s*=|[\[\s]?)https?:\/\/(?:[^|</]+\.)*([-\w]+)(?:\.[a-z]{2,3})\/[^<>|{}\d]*@YYYY[-\/]@MM[-\/]@DD\/(\w+)[^<>]*)(?=<\/ref>)/gi, "<ref name=@Year@ZM@ZD$2-$3>$1"); //urls with non-date serial numbers
ohc_regex(/<ref>((?:[^<>]*\|\s*url\s*=|[\[\s]?)https?:\/\/(?:[^|</]+\.)*([-\w]+)(?:\.[a-z]{2,3})\/[^<>|{}\d]*@YYYY[-\/]@Month[-\/]@DD\/(\w+)[^<>]*)(?=<\/ref>)/gi, "<ref name=@Year@ZM@ZD$2-$3>$1"); //urls with non-date serial numbers
ohc_regex(/<ref>([^<>]*\|\s*url\s*=https?:\/\/(?:[^|</]+\.)*(
ohc_regex(/<ref>([^<>]*\|\s*url\s*=https?:\/\/(?:[^|</]+\.)*(
ohc_regex(/<ref>([^<>]*\|\s*url\s*=https?:\/\/(?:[^|</]+\.)*(
ohc_regex(/<ref>((?:[^<>]*\|\s*url\s*=|\[?)https?:\/\/(?:[^|<]+\.)*(\w+)\.(?:(?:com?|org|net|gov|ac|[a-z]{2})(?:\.[a-z]{2}|))\/[^<>|{}]+@YYYY[\/-]?@Month[\/-]?@Day[^<>]*)(?=<\/ref>)/gi, "<ref name=@YYYY@MM@DD$2>$1"); //urls with embedded dates
}
|