There are some nice solutions to How to find all numbers in a string for XSLT 2 and even 3. How can I accomplish the exact same thing within the limits of XSLT 1
(withe the possible help of EXSLT)?
Here’s an example:
<data>
<sig>NL Mellin 1-1 36</sig>
<sig>NL Mellin 1-1 38</sig>
<sig>NL Mellin 1-10 02</sig>
<sig>NL Mellin 1-10 04</sig>
<sig>NL Mellin 1-10 09</sig>
</data>
The desired output would be:
1 1 36
1 1 38
1 10 02
1 10 04
1 10 09
Try it this way:
XSLT 1.0
Note:
If you have multiple delimiters, you need to translate them to a common character (space in my example);
I didn't bother to remove the trailing space in each line;
If your processor supports the EXSLT str:tokenize() function, this could be simpler.