title: XSLT - regex select only one digit number from text() node
body: <p>I've xml like this,</p>
  
  <pre><code>&lt;section&gt;
      &lt;para&gt;height 4cm, width 5cm, weight 343&lt;/para&gt;
      &lt;para&gt;height 2cm, width 6cm, weight 410&lt;/para&gt;
      &lt;para&gt;height 3cm, width 1cm, weight 590&lt;/para&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>here I need to doubled the single digit numbers of the <code>para/text()</code>. desired output should looks like,</p>
  
  <pre><code>  &lt;section&gt;
          &lt;para&gt;height 8cm, width 10cm, weight 343&lt;/para&gt;
          &lt;para&gt;height 4cm, width 12cm, weight 410&lt;/para&gt;
          &lt;para&gt;height 6cm, width 2cm, weight 590&lt;/para&gt;
      &lt;/section&gt;
  </code></pre>
  
  <p>To do this I've a template like this,</p>
  
  <pre><code>&lt;xsl:template match="para/text()"&gt;
          &lt;xsl:analyze-string select="." regex="\d"&gt;
  
              &lt;xsl:matching-substring&gt;
                  &lt;xsl:value-of select="2 * number(.)"/&gt;
              &lt;/xsl:matching-substring&gt;
  
              &lt;xsl:non-matching-substring&gt;
                  &lt;xsl:value-of select="."/&gt;
              &lt;/xsl:non-matching-substring&gt;
  
          &lt;/xsl:analyze-string&gt;
      &lt;/xsl:template&gt;
  </code></pre>
  
  <p>the problem here is this, this takes none single digit number as one digit by one and double them up,</p>
  
  <p>current output,</p>
  
  <pre><code>&lt;section&gt;
      &lt;para&gt;height 8cm, width 10cm, weight 686&lt;/para&gt;
      &lt;para&gt;height 4cm, width 12cm, weight 820&lt;/para&gt;
      &lt;para&gt;height 6cm, width 2cm, weight 10180&lt;/para&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>any suggestion how can I solve this?</p>