This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Splitting non-delimited string
- From: Trevor Nash <tcn at melvaig dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Cc: "Denny, Allison M. (LNG-CIS)" <allison dot denny at lexisnexis dot com>
- Date: Fri, 28 Dec 2001 17:36:05 +0000
- Subject: Re: [xsl] Splitting non-delimited string
- Organization: Melvaig Software Engineering Limited
- References: <17AAD707C88BD21199ED00805F1999890381093C@lnxbetexch01.lexis-nexis.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Alison,
>Hello,
>
>I have an id that is half numeric and half text. I need to split it into
>two ids--one numeric, and one text. The id can be any length, and has no
>delimiters.
>
>From:
><AgencyReportNumber>123ABC</AgencyReportNumber>
>
translate (., '0123456789', '') will delete all the digits leaving you
the letter part, you can then use either substring-before() or
string-length() and substring() to get hold of the digits part.
Trevor Nash
--
Traditional training & distance learning,
Consultancy by email
Melvaig Software Engineering Limited
voice: +44 (0) 1445 771 271
email: tcn@melvaig.co.uk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list