Hi guys, I am using this package. Hopefully people might know that i asked this doubt few post before. I made some start but just couldnt finish it.
http://jregex.sourceforge.net/gstarted.html#searching Help me here. I m trying out regular expression which can do something like this in java. <input type='checkbox' name='8' value='505'>some dynamic text MATCHING TEXT</input> and replaces this with <input type='checkbox' name='8' value='505' DISABLED>some dynamic text MATCHING TEXT</input> I basically want something like this in a string for pattern searching: String str1 = "<input type='checkbox' name='8' value='505' "; String str2 = ">some dynamic text"; String str3 = "MATCHING TEXT"; String str4="</input>"; Pattern p= new Pattern(str1 str2 str3 str4;); Replacer r=p.replacer("[$1, $2, $3 DISABLED, $4]"); prodInfo ="<input type='checkbox' name='8' value='505'>some dynamic text MATCHING TEXT</input>"; String result=r.replace(prodInfo); I m not very good at regular expression, so i basically know the steps but just couldnt get the right expression to pass it on to Pattern class. Any help would be appreciated. <snip> I tried this but cant go beyond this. (?ism)<(\w+ \w+)=(\'\w+\') (\w+)=(\'\w+\') (\w+)=(\'\w+\')>(?s)\w+ </snip> Looking forward for some response. Have a great day. Karthikeyan. ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
