Content deleted Content added
mNo edit summary |
mNo edit summary |
||
Line 156:
// ohm
txt.value = txt.value.replace(/(\d)\s?(Y|Z|E|P|T|G|M|k|K|h|da|d|c|m|µ|μ|µ|n|p|f|a|z|y)?\s?(Ω|ohm|Ohm)s?(\W)/g, '$1 $2Ω$4');
// mile and mile per hour▼
txt.value = txt.value.replace(/\[\[miles?\|([^\]]{1,30})\]\]/gi, '$1');▼
txt.value = txt.value.replace(/\[\[(miles?)\]\]/gi, '$1');▼
txt.value = txt.value.replace(/m\.p\.h\.(\W)/g, 'mph$1');▼
txt.value = txt.value.replace(/(\W)mph(\W)/gi, '$1mph$2');▼
txt.value = txt.value.replace(/(\d)\s?mph/gi, '$1 mph');▼
txt.value = txt.value.replace(/(\d)\-mph/gi, '$1 mph');▼
// pound weight
Line 189 ⟶ 181:
// foot and inch
//txt.value = txt.value.replace(/([^;°h]{1,4})(\d{1,4})\s?['’]\s?(\d{1,3})\s?["”]([^NESW])/g, '$1$2 ft $3 in$4');
txt.value = txt.value.replace(/(ength[.]{1,3})(\d{1,4})\s?['’]\s?(\d{1,3})\s?["”]/gi, '$1$2 ft $3 in');
txt.value = txt.value.replace(/(idth[.]{1,3})(\d{1,4})\s?['’]\s?(\d{1,3})\s?["”]/gi, '$1$2 ft $3 in');
Line 200 ⟶ 192:
txt.value = txt.value.replace(/sq\.?\s?yds?/gi, 'sq yd');
txt.value = txt.value.replace(/yd\.\)/gi, 'yd)');
▲ // mile and mile per hour
▲ txt.value = txt.value.replace(/\[\[miles?\|([^\]]{1,30})\]\]/gi, '$1');
▲ txt.value = txt.value.replace(/\[\[(miles?)\]\]/gi, '$1');
▲ txt.value = txt.value.replace(/m\.p\.h\.(\W)/g, 'mph$1');
▲ txt.value = txt.value.replace(/(\W)mph(\W)/gi, '$1mph$2');
▲ txt.value = txt.value.replace(/(\d)\s?mph/gi, '$1 mph');
▲ txt.value = txt.value.replace(/(\d)\-mph/gi, '$1 mph');
// square mile
|