xsl-list
[Top] [All Lists]

Re: [xsl] reducing string length

2008-11-17 05:33:35
whow great thx... yes I will test if the string is > 25 just before

Geert Josten wrote:
Not too difficult I'd say:

concat(substring(substring-before(email, '@'), 1, 10), 
'(_dot_)(_dot_)(_at_)(_dot_)(_dot_)', substring(substring-after(email, '@'), 
string-length(substring-after(email, '@')) - 10 + 1, 10))

Or perhaps you would like to add some if's to test for total length and lengths 
of left and right hand first..

;-)


Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.


From: Bastiaan Wakkie [mailto:bwakkie(_at_)gmail(_dot_)com]
Sent: maandag 17 november 2008 11:14
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] reducing string length

Someone tried already to reduce a long email string into a
smaller one in xsl v1.0 ?

like

myverywaytolongemail(_dot_)address(_at_)mydomain(_dot_)com

into  something like:


 myveryway(_dot_)(_dot_)(_at_)(_dot_)(_dot_)domain(_dot_)com

So it does not exceed the length of 25 chars.

thanks,
Bastiaan


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>