regular expression help needed

Discussion in 'ASP General' started by Gianni B., Sep 6, 2004.

  1. Gianni B.

    Gianni B. Guest

    Hi there. A client of mine has a static html ecommerce site using a
    3rd party shopping cart. I have been ask to build a program that
    scans their site and looks for product id's (which are in the
    descriptions) and do the following to items that are sold out (for
    updating purposes):

    1. replace the html text yes to no which will reflect the items
    availability

    2. be able to comment out the submit button for adding that item to
    their cart


    Here's the code i'll be looking at. the sku number i will search for
    in this example is "cd-711", which shows up in the middle of the html.
    So again, here's what I want to do in more detail:

    1. find the text "yes" that shows up before the first match of the
    text "cd-711" and replace the word "yes" with "no"

    2. be able to comment out (<!-- <form ... -->) the form which exists
    after finding the text "cd-711"

    I hope this makes sense. Thanks in advance.

    <td align=left height=101 id=vTD3 valign=top width=166>
    available: <span id=strAvail_final name="strAvail_final">yes</span>
    <br>
    item #:
    <span id=strItemNum_final name="strItemNum_final">cd-711</span>
    <br>
    <form action="http://www.ecommerceserver.com" name=frmserver >
    <input type=image src="../images/img_submit.gif">
    </form>

    </td>
    Gianni B., Sep 6, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VSK
    Replies:
    2
    Views:
    2,281
  2. David Cho
    Replies:
    4
    Views:
    399
    David Cho
    Feb 15, 2005
  3. Chanchal
    Replies:
    1
    Views:
    491
    NullBock
    Dec 13, 2005
  4. pekka niiranen
    Replies:
    5
    Views:
    516
    Paul McGuire
    Oct 20, 2004
  5. ragz_82
    Replies:
    1
    Views:
    298
    ragz_82
    Aug 4, 2009
Loading...

Share This Page