MyBB Community Forums

Full Version: Numeric Position Qualifiers Updated: 12/31/09
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Another simple numeric MyCode.

Latest version (to allow for things like 6 19ths)
Regex:
(\d+)(sts?|nds?|rds?|ths?)

Replacement:
$1<sup>$2</sup>



Outdated

Title:
Numeric Position Qualifers

Desc:
MyCode that Superscripts the st, rd, nd, and th numeric postion qualifiers when posting in 1st, 2nd, 33rd, and 9th type of format.

Regex:
(\d+)(st|nd|rd|th)

Replacement:
$1<sup>$2</sup>

Usage:
1st, 2nd, 53rd, 99th, etc...
Smart thinking. Smile
Thanks, I wanted fractions, and I figured, if I'm doing the fractions I may as well do this too, since its related and so simple Smile
I've updated this to allow some new functionality. I'd also like to note that if this is used WITH my Fractions MyCode it will sub AND sup at the same time the ths, rds, etc.. resulting in it being super subscripted. Or, put another way, centered in the line but small text.