473,387 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

regular expression help needed

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>
Jul 19 '05 #1
0 928

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jack Smith | last post by:
I posted this question earlier, but I got no responses. Can anyone help me out here...any hints or even how to start? Thanks in advance. Let doubleswap(x) be the string formed by replacing each...
14
by: Tina Li | last post by:
Hello, I've been struggling with a regular expression for parsing XML files, which keeps giving the run time error "maximum recursion limit exceeded". Here is the pattern string: ...
4
by: pekka niiranen | last post by:
Hi there, I have perl script that uses dynamically constructed regular in this way: ------perl code starts ---- $result ""; $key = AAA\?01; $key = quotemeta $key; $line = " ...
6
by: Chris Lasher | last post by:
Hello, I would like to create a set of very similar regular expression. In my initial thought, I'd hoped to create a regular expression with a variable inside of it that I could simply pass a...
4
by: Neri | last post by:
Some document processing program I write has to deal with documents that have headers and footers that are unnecessary for the main processing part. Therefore, I'm using a regular expression to go...
2
by: Dot net work | last post by:
Hello. Say I have a .net textbox that uses a .net regularexpressionvalidator. If the regular expression fails, is it possible to launch a small client side javascript function to do something,...
5
by: tmeister | last post by:
I am in need of a regular expression that tests and fails if there are 14 or more of a character in the test string. There can be up to 13 of these characters in the string and any other...
2
by: PawelR | last post by:
Hello everybody, I have problem with regular expression. I want "code" telephon number and I have two types number: 1) or 2) ( or ) where x - is digital Maybe someone know where is simple...
6
by: Øyvind Isaksen | last post by:
Can anyone please help me make i regular expression (asp.net / vb.net) that check if a password is more than 5 digit/char? Example passwords: whK5v = valid password hd3 = invalid password...
7
by: Billa | last post by:
Hi, I am replaceing a big string using different regular expressions (see some example at the end of the message). The problem is whenever I apply a "replace" it makes a new copy of string and I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.