This section contains regular expressions for properly formatting units of area and volume.
Replace sq m/km with m² and km²
edit
Description
|
Replace sq km/sq m and variants with km² and m²
|
Find
|
sq\.?(?:\s| |-)*(k)?ms?(?!i)
|
Replace with
|
$1m²
|
Regular expression?
|
Case sensitive?
|
Y
|
Y
|
Text this regex should modify:
|
Intended result:
|
- sqkm
- sq.km
- sq km
- sq km
- sqkms
- sq.kms
- sq kms
- sq kms
- sqm
- sq.m
- sq m
- sq m
- sqms
- sq.ms
- sq ms
- sq ms
|
- km²
- km²
- km²
- km²
- km²
- km²
- km²
- km²
- m²
- m²
- m²
- m²
- m²
- m²
- m²
- m²
|
Text this regex should not modify:
|
- sqmi
- sq.mi
- sq mi
- sq mi
- sqmis
- sq.mis
- sq mis
- sq mis
|
Get rid of periods after m² and m³
edit
Description
|
Get rid of periods after m² and m³, if it's definitely not the end of a sentence
|
Find
|
m(²|³)\.\)
|
Replace with
|
m$1)
|
Regular expression?
|
Case sensitive?
|
Y
|
Y
|
Text this regex should modify:
|
Intended result:
|
- m².)
- m³.)
|
- m²)
- m³)
|