xsl-list
[Top] [All Lists]

RE: Calculations involving measurements with units

2004-01-02 02:55:09

Another way to remove all characters except digits (and decimal points)
from a string is:

translate($x, translate($x, '0123456789.', ''), '')

Michael Kay


A much more elegant solution than mine - and I see now that my solution would stumble on a real number. This is probably also much faster than doing it character by character, recursively.

Ragulf :)

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list