Hello, I am using the RE.subst method.Here is the code on one of my JSP pages.this is very similar to the example in the docs of the RE <% RE r = new RE("( http://[\\.\\w\\-\\?/~_@ <http://[///w//-//?/~_@&=%> &=%]+)"); String toSubsWith="<a href=\"$0\">$0</a>"; String tempBefStr=r.subst(strDescription,toSubsWith); %>
strDescription has in it http://something <http://something/> .WHat is happening is it is finding the http: but while substituting it is substituting the $0 instead of the whole match. For example if strDescription =Welcome to http:/www.yahoo.com isnt it great The string getting returned is "Welcome to $0 isnt it great" I have tried using String toSubsWith="<a href=\"$&\">$&</a>"; but that dint help.Am I missing something?I am using the jakarta-regexp-1.3.jar Thanks AP