[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Filter leading numbers out of Strings
Hi Michael,
thank`s a lot for your help. After your advice i realised that i only meant the leading numbers of any other characters without the trailing numbers. Anyhow, here ist my solution based on your hint: <xsl:variable name="stringJunK" select="translate($String,'0123456789','')"/>(filter out all numbers) <xsl:variable name="firstCharacterOfJunK" select="substring($stringJunK,1,1)"/>(Get the first character of the non-numbers) <xsl:variable name="leadingNumbers" select="substring-before($String,$firstCharacterOfJunK)"/>(get the numbers before the first non-number sign) (Exception:Only numbers, where i use an additional if-query). Cheers, Rolf Michael Kay schrieb: You say leading numbers, but you don't give an example with a trailing number. What do you want to happen to 123ABC789?
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|