XSLT + regular expression support

I'm really getting into XSLT -- it's a very powerful way of manipulating XML, but it still seems crazy to me that there's no easy way of getting regular expression support given how much of XML data is, you know, text.

Ah well -- at least Xalan has a good support mechanism for extensions. How about some JavaScript RegExp goodness? This page and this page outline a method to get it working, but there's currently unspecified weirdness which is annoying me.

I'll have to try a few combinations of libraries and see what works. Watch this space!