Content deleted Content added
mNo edit summary |
mNo edit summary |
||
Line 92:
txt.value = txt.value.replace(/(\d)\-mph/gi, '$1 mph');
//
txt.value = txt.value.replace(/(\d)\s?lbs?/gi, '$1 lb');
txt.value = txt.value.replace(/(\d\+?)\s?lbs?/gi, '$1 lb');
Line 98:
txt.value = txt.value.replace(/(\d)\s?(\[\[lbs\]\])/gi, '$1 \[\[Pound (mass)|lb\]\]');
//
txt.value = txt.value.replace(/(\d)\s?yds(\W)/gi, '$1 yd$2');▼
txt.value = txt.value.replace(/(\d) yds(\W)/gi, '$1 yd$2');▼
//txt.value = txt.value.replace(/(N•m)/gi, 'N·m');
//
txt.value = txt.value.replace(/(\d)\s?kW([\s,.;:\)\(\\/)])/g, '$1 kW$2');
txt.value = txt.value.replace(/(\d)\-kW([\s,.;:\)\(\\/)])/g, '$1 kW$2');
//
txt.value = txt.value.replace(/ft[ -.·•\/]lb[fs]/gi, 'ft·lbf');
txt.value = txt.value.replace(/ft[ -.·•\/]lbf/gi, 'ft·lbf');
Line 118 ⟶ 114:
//txt.value = txt.value.replace(/lb[ -.•\/]ft/gi, 'ft·lbf');
//
txt.value = txt.value.replace(/([^;°h][^;°h]\s)(\d{1,4})\s?['’]\s?(\d{1,2})\s?["”][^NESW]/g, '$1$2 ft $3 in');
txt.value = txt.value.replace(/([\(\|]\d{1,4})\s?['’]\s?(\d{1,2})\s?["”][^NESW]/g, '$1 ft $2 in');
txt.value = txt.value.replace(/(\d)\s?ft\s(\d{1,2})\s?in/gi, '$1 ft $2 in');
▲ //Symbols for square feet
txt.value = txt.value.replace(/sq\.?\s?ft?/gi, 'sq ft');
txt.value = txt.value.replace(/ft\.\)/gi, 'ft)');
// yards
▲ txt.value = txt.value.replace(/(\d)\s?yds(\W)/gi, '$1 yd$2');
▲ txt.value = txt.value.replace(/(\d) yds(\W)/gi, '$1 yd$2');
txt.value = txt.value.replace(/sq\.?\s?yds?/gi, 'sq yd');
txt.value = txt.value.replace(/yd\.\)/gi, 'yd)');
// Give digital value a percent symbol '%' instead of word
|