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

Content deleted Content added
reorder for protection of 'convoy' strings
hyphenation x-kilogram/pound
Line 32:
 
//add correct hyphenation
regex(/\b([2-9]|\d{2,3}|half|quarter|two|three|four|five|six|seven|eight|nine|ten) (second|minute|hour|day|week|month|year|decade|fold|liter|litre|degree|pound|inch|foot|yard|mile|meter(?:kilo|)met(?:re|metreer)|man|page|point|word|dollar|cent|floor|store?y|(?:bed|)room)\b/g, "$1-$2");
regex(/\b([2-9]|\d{2,3}|two|three|four|five|six|seven|eight|nine|ten)-(second[- ]class)\b/g, "$1 $2"); //palliative to reverse incorrectly inserted hyphen "n-second-class"
regex(/\b(two|three|four|five|six|seven|eight|nine|ten) (halves|thirds|quarters|(?:four|fif|six|seven|eigh|nin|ten)ths)\b/gi, "$1-$2");