Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: How do i remove 0d 0a characters

Ralph Einfeldt

2004-04-26

Replies:

I think you are trying to replace the sequence
'\' 'r' '\' 'n'. (4 characters) and not the
carriage return.

<c:set var="varTmp" value="${fn:replace(varTmp,'\r\n','')}" />
<c:set var="varTmp" value="${fn:replace(varTmp,'\r',' ')}" />
<c:set var="varTmp" value="${fn:replace(varTmp,'\n',' ')}" />

> -----Original Message-----
> From: Eric Noel [mailto:ericnoel@(protected)]
> Sent: Monday, April 26, 2004 2:23 AM
> To: Tomcat Users List
> Subject: OT: How do i remove 0d 0a characters
>
>
> I had problems with data fetched from db where it contains 0d 0a
> character ( it think its a carriage return). so i try doing the
> following to remove them.( btw, im using jsp 2.0). but its
> seems its not removing them? any help will be appreciated.
>
>    <%-- Replace 0d 0a carriage returns & line feeds --%>
>    <c:set var="varTmp" value="${fn:replace(varTmp,'\\\r',' ')}" />
>    <c:set var="varTmp" value="${fn:replace(varTmp,'\\\n',' ')}" />
>    <c:set var="varTmp" value="${fn:replace(varTmp,'\\\r\\\n','')}" />
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.