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

Content deleted Content added
Undid revision 895247207 by Ohconfucius (talk)
Revert to revision 892401969 dated 2019-04-14 08:24:52 by Ohconfucius using popups
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|(?:kilo|)met(?:remeter|er)metre|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");