User:TomTheHand/Unit tests for AWB regexes/Speed
Appearance
This section contains regular expressions for formatting units of speed.
Replace km/hr with km/h
[edit]Description | |
---|---|
Replace km/hr with km/h | |
Find | |
km/hr | |
Replace with | |
km/h | |
Regular expression? | Case sensitive? |
N | Y |
Text this regex should modify: | Intended result: |
km/hr |
km/h |
Replace ft/sec(ond) with ft/s
[edit]Description | |
---|---|
Replace ft/sec or ft/second with ft/s | |
Find | |
\b(\d+)(?:\s| |-)?ft\/s(?:ec(?:ond)?)?\b | |
Replace with | |
$1 ft/s | |
Regular expression? | Case sensitive? |
Y | N |
Text this regex should modify: | Intended result: |
|
|
Replace (k)m/sec(ond) with (k)m/s
[edit]Description | |
---|---|
Replace km/sec, km/second, m/sec or m/second with km/s or m/s as appropriate | |
Find | |
\b(\d+)(\s| |-)?(k?m)\/s(?:ec(?:ond)?)?\b | |
Replace with | |
$1$2$3/s | |
Regular expression? | Case sensitive? |
Y | Y |
Text this regex should modify: | Intended result: |
|
|
Replace m.p.h. with mph
[edit]Description | |
---|---|
Replace m.p.h. with mph | |
Find | |
m.p.h. | |
Replace with | |
mph | |
Regular expression? | Case sensitive? |
N | N |
Text this regex should modify: | Intended result: |
m.p.h. |
mph |