Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

XSL: Easiest way to find if string a contains numbers

Hello,

I was wondering about what would be the easiest way to find a, b, c, in d?

Example of my stylesheet:
<xsl:choose>
<xsl:when test="contains($theWord, '1') or contains($theWord, '2')">
<xsl:text>There be a 1 on a 2 in your word!!</xsl:text>
</xsl:when>
<xsl:otherwise />
</xsl:choose>

Now what if I wanted to check wether $theWord contained a number would I
then be FORCED to write:
contains($theWord, '0') or contains($theWord, '1') ... or contains($theWord,
'9')

or is there a shorter (less typing) to do the same?

A Friendly Greeting
/Rasmus
[726 byte] By [Rasmus] at [2007-11-9 15:27:54]