User:TomTheHand/Unit tests for AWB regexes

Hi there! This is my testing page for my AWB regular expressions. I realized that I really needed to perform unit testing on my regexes to make sure they all worked properly, so I started up these pages. I then realized that if I also provide the regexes themselves, people might be able to come by and use them.

I've used &lt;small&gt; tags on the really lengthy ones to try to shrink the width of the table. I realize that this makes many of them illegible, but you can copy and paste them elsewhere for study. I also realize some tables are still horrifyingly wide and will not fit on screens with a resolution less than 1024 pixels wide. Sorry 'bout that.

In order to use them:
 * 1) Fire up AWB.
 * 2) Go to the Options tab.
 * 3) Click "Advanced" under "Find and replace".
 * 4) Click "New rule".
 * 5) Copy my description into Name.
 * 6) Copy my "Find" and "Replace with" text into their respective boxes. Don't edit this page and copy them directly out of the page source; they won't work.  View this page and grab them that way.
 * 7) Look at my "Regular expression?" and "Case sensitive?" Y/N boxes, and check the proper options in AWB. If "Case sensitive?" is N/A, it doesn't matter whether the box is checked or not.
 * 8) Click OK, and you're good to go.

You could pull these pages up in AWB and make sure that the tests work properly. Let me know if you have any questions or problems.

If you run into any false positives or negatives, please let me know. I'll try to fix them, and then update my regex and unit test to prove that they now handle the new situation. Also, if you dislike any of the changes I'm making, please inform me and we can discuss it. I primarily edit articles about ships, and so I'm not trying to implement these changes everywhere, but if I'm doing something that you think is blatantly wrong we should talk about it.

General
This section contains regular expressions that make general fixes, not limited to a particular topic or type of unit.

Geographical coordinates
This section contains regular expressions for converting plain-text geographical coordinates to coord.

Frequency
This section contains regular expressions for properly formatting frequency.

Area and volume
This section contains regular expressions for properly formatting units of area and volume.

Length
This section contains regular expressions for formatting units of length.

Speed
This section contains regular expressions for formatting units of speed.

Power
This section contains regular expressions for formatting units of power.

Final
These are general-purpose regexes, but they should be run last, because their purpose is to make some final fixes after all the other work has been done.