User:TomTheHand/Unit tests for AWB regexes/Area and volume
Appearance
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: |
|
|
Text this regex should not modify: | |
|
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: |
|
|