Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Regular Expression Question

Reply
Thread Tools

Regular Expression Question

 
 
Gianni Brasco
Guest
Posts: n/a
 
      10-03-2004
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!
 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      10-05-2004
Look for NAME and ID together with TD
and for innerHtml
and Javascript to alter the content


"Gianni Brasco" <> schreef in bericht
news: om...
> 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!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seek xpath expression where an attribute name is a regular expression GIMME XML 3 12-29-2008 03:11 PM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C++ 42 11-04-2008 12:39 PM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C Programming 45 11-04-2008 12:39 PM
Matching abitrary expression in a regular expression =?iso-8859-1?B?bW9vcJk=?= Java 8 12-02-2005 12:51 AM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57