A
AjalaDeveloper
Hello people, I'm trying to do something very easy (I think so!). I'm
using Java regular expression to remove-> // in an html code, for
example in the next example, I would like to replace // with /, but
only those wich aren't next to http:
------------------------------------------------------------------------------------
<img src="http://example.com//img/img.jpg>
------------------------------------------------------------------------------------
I have problems in this example, just because I don't want to remove //
which are next to http:
I'd like to get: <img src="http://example.com/img/img.jpg>. I'm trying
wih the next java code:
------------------------------------------------------------------------------------
completeHtml = completeHtml.replaceAll("(?!http://)//*","/");
------------------------------------------------------------------------------------
I'm getting as result this: <img src="http:/example.com/img/img.jpg">.
I don't want to lose a / in http://
Please help me! Tk you
using Java regular expression to remove-> // in an html code, for
example in the next example, I would like to replace // with /, but
only those wich aren't next to http:
------------------------------------------------------------------------------------
<img src="http://example.com//img/img.jpg>
------------------------------------------------------------------------------------
I have problems in this example, just because I don't want to remove //
which are next to http:
I'd like to get: <img src="http://example.com/img/img.jpg>. I'm trying
wih the next java code:
------------------------------------------------------------------------------------
completeHtml = completeHtml.replaceAll("(?!http://)//*","/");
------------------------------------------------------------------------------------
I'm getting as result this: <img src="http:/example.com/img/img.jpg">.
I don't want to lose a / in http://
Please help me! Tk you