Sounds like you should be using JavaScript regular expressions, not Java.
Download the manual; the regex object is well documented and is useful for
regular expressions in any language:
http://developer.netscape.com/docs/manuals/

Otherwise (also), get Jeffrey Friedl's "Mastering Regular Expressions, 2d"
(O'Reilly 2002), which covers Unix grep, Perl 5.x, Java 1.4, and .NET in
more detail than you will ever want to know.  :-)

Finally, the JavaDocs for java.util.regex.Pattern and
java.util.regex.Matcher are pretty extensive as far as typical JavaDocs go.

Mark 

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. [mailto:[EMAIL PROTECTED] On Behalf Of
karthikeyan.balasubramanian
Sent: Thursday, May 29, 2003 7:58 AM
To: [EMAIL PROTECTED]
Subject: Regular Expression Doubt


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&nbsp;&nbsp;</input>
    </TD>
    <TD>MC505 - 10.4" LCD Touch Display</TD>
  </TR>
  <TR>
    <TD>
      <input type='checkbox' name = '8' value = '502'
>502&nbsp;&nbsp;</input>
    </TD>
    <TD>MC510 - 10.4" LCD  Display</TD>
  </TR>
  <TR>
    <TD>
      <input type='checkbox' name = '9' value = '512'
>512&nbsp;&nbsp;</input>
    </TD>
    <TD>MC640 - Shielded Video cable - 6'</TD>
  </TR>
  <TR>
    <TD>
      <input type='checkbox' name = '9' value = '517'
>512&nbsp;&nbsp;</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>

How difficult is it in Java, if performace is concern should i use RegEx.

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.

Looking for some response.

Have a great day.

Karthikeyan B

___________________________________________________________________________
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

___________________________________________________________________________
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

Reply via email to