Re: Trying to block out BGCOLOR

2003-03-25 Thread Todd W
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm making something, and need to block out BGCOLOR attribute. The problem > is, the BGCOLOR could be with or without quotation marks. This is the code I > used: > > $article =~ s/ bgcolor=("?)(.*?)("?)//gi > Here is how I would do it,

Re: Trying to block out BGCOLOR

2003-03-21 Thread WilliamGunther
Just so everyone knows, it was for a print friendly part of a CMS-type script. With all your help, it was solved, with a regex. It wasn't just for the body tag, It is for EVERY tag, and I blocked the BGCOLOR, BACKGROUND, STYLE, CLASS, ID, COLOR, and more attributes to totally make the page both

Re: Trying to block out BGCOLOR

2003-03-21 Thread drieux
volks, brief prefix. I believe Li Ngok Lam has found a clear 'issue' in the original request for solving a regex problem. my working assumption was that the OP needed a filter that would clean up a bunch of pre-existing static *.html files because the site had adopted a new scheme, and so these ol

Re: Trying to block out BGCOLOR

2003-03-21 Thread Jimmy George
Hello World Li Ngok Lam's approach looks good to me. Using the $line=~s// approach appears to be only removing the bgcolor word correctly but could be stuck on the different types of colour descriptor used. Is it RGB, hex or a word? Putting a background color descriptor in though allows you to ch

Re: Trying to block out BGCOLOR

2003-03-21 Thread Li Ngok Lam
What about the user says : or or Anyway, the bgcolor can be formed or change again via javascript or CSS. I mean, blocking bgcolor in body tag cannot solve your potential problem. But you may find someway to put this in your body tag : background="white_block.jpg", as wallpaper goes upper tha

Re: Trying to block out BGCOLOR

2003-03-20 Thread drieux
On Thursday, Mar 20, 2003, at 11:26 US/Pacific, Kipp, James wrote: I'm saying it could be bgcolor="COLOR" or bgcolor=COLOR Yes I realize. I believe drieux's solution, or an adaptation of it, is what you need note: I do subs because it is easier for me to 'loop on them' and if they are worth it, th

RE: Trying to block out BGCOLOR

2003-03-20 Thread Kipp, James
>I'm saying it could be bgcolor="COLOR" or bgcolor=COLOR Yes I realize. I believe drieux's solution, or an adaptation of it, is what you need I would of course go with say: # # sub un_colour {

Re: Trying to block out BGCOLOR

2003-03-20 Thread WilliamGunther
I'm saying it could be bgcolor="COLOR" or bgcolor=COLOR

Re: Trying to block out BGCOLOR

2003-03-20 Thread drieux
On Thursday, Mar 20, 2003, at 06:00 US/Pacific, Kipp, James wrote: I'm making something, and need to block out BGCOLOR attribute. The problem is, the BGCOLOR could be with or without quotation marks. This is the code I used: $article =~ s/ bgcolor=("?)(.*?)("?)//gi so you are saying it could be b

RE: Trying to block out BGCOLOR

2003-03-20 Thread Kipp, James
> > I'm making something, and need to block out BGCOLOR > attribute. The problem > is, the BGCOLOR could be with or without quotation marks. > This is the code I > used: > > $article =~ s/ bgcolor=("?)(.*?)("?)//gi > so you are saying it could be bgcolor or "bgcolor" ? how about something

Trying to block out BGCOLOR

2003-03-19 Thread WilliamGunther
I'm making something, and need to block out BGCOLOR attribute. The problem is, the BGCOLOR could be with or without quotation marks. This is the code I used: $article =~ s/ bgcolor=("?)(.*?)("?)//gi It doesn't work to my liking, and was hoping someone else had a better solution. William