Regular Expression Question

G

Gianni Brasco

Hi there...i have a little regexp question. i'm trying to do a search
and replace for this static ecommerce site. i need to change the
status of the products availablity from "yes" to "no". I have a
script that searches all the html pages by the product ID. I am able
to find the necessary page where I will need to update the text, but I
am having trouble searching and replacing within the document.

Here is some sample code that I'm searching:

<font color="#CCCCCC">available: <font color="#FFFFFF">yes<br>
</font>item #: <font
color="#FFFFFF">cd-213</font></font></font></font>

cd-213 is the product code. i would like to build a regular
expression that finds the first instance of "yes" before the product
code and replace that text with the word "no". in this case it's
cd-213.

hopefully someone can help me. right now i'm doing a wild card search
that finds the first instance of yes, then everything in between until
the product code is found. not what I want :(

thanks!
 
J

John

Look for NAME and ID together with TD
and for innerHtml
and Javascript to alter the content
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top