karthikeyan.balasubramanian wrote: > Hi, > > I have 2 set of strings : > > String A > ========== > > "MC200 - 19" IBM Std, Rackmount computer" > > String B > ========== > > <TABLE border='0' cellpadding='2' cellspacing='2'> > <TR> > <TD> > <input type='checkbox' name = '8' value = '501' > >>501 </input> > > </TD> > <TD>MC505 - 10.4" LCD Touch Display</TD> > </TR> > <TR> > <TD> > <input type='checkbox' name = '8' value = '502' > >>502 </input> > > </TD> > <TD>MC510 - 10.4" LCD Display</TD> > </TR> > <TR> > <TD> > <input type='checkbox' name = '9' value = '512' > >>512 </input> > > </TD> > <TD>MC640 - Shielded Video cable - 6'</TD> > </TR> > <TR> > <TD> > <input type='checkbox' name = '9' value = '517' > >>512 </input> > > </TD> > <TD>MC652 - RS-232 Serial Cable - 10'</TD> > </TR> > </TABLE> > > Now if there is any MC2xx, or MC3xx in String A then i need to add DIABLED > to > 1. Touch Display > 2. Serial Cable. > > i.e. <input type='checkbox' name='8' value='501' DISABLED> > > Now searching should not be a problem in RegEx i believe. I can issue > > MC[23..] how about finding out "Touch Display" and "Serial Cable" and adding > DISABLED to it <INPUT> Type. > > Can somebody help me out in this.
If you can determine the need prior to creating the B string, you could insert it thusly: <TD>MC652 - RS-232 Serial Cable - 10' $disabled</TD> and $disabled could default to '' when not needed. If string B already exists, you could still split the string into pieces and insert $disabled at the appropriate spots, eg: $stringb = 'stuff here' . 'more stuff' . $disabled . 'still more stuff'; If the string already exists and you can't split it up like that, you could insert a special code to look for and replace it with either a null expression or the deleted HTML code. $stringb = 'stuff here more stuff ZYXYZ still more stuff'; and replace ZYXYZ with whatever. -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (Free site for Perl/Lakers) _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs