[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

REGULAR EXPRESSION HELP

Newb Newb

8/23/2008 9:24:00 AM

Hi all
I am Trying To sort Out This Proble for the past 4 Hours..But
couldn't Find Any Solutions I have a string ..it contains text and
images also..from that string i want to replace the All The Images Into
Empty space..
that is images Has to Be Removed.

I tried like below

item.description = item.description.gsub(/\<*img.*src=".*".*?\/\>/,'
')

Using This Regular Expression I can able to Reomve Only The First
Occurrences of The Images,But I Need TO Remove All Occurences Of The
Images



So Any Guru Can give Me solution...
--
Posted via http://www.ruby-....

2 Answers

Matt Harrison

8/23/2008 9:43:00 AM

0

Newb Newb wrote:
> Hi all
> I am Trying To sort Out This Proble for the past 4 Hours..But
> couldn't Find Any Solutions I have a string ..it contains text and
> images also..from that string i want to replace the All The Images Into
> Empty space..
> that is images Has to Be Removed.
>
> I tried like below
>
> item.description = item.description.gsub(/\<*img.*src=".*".*?\/\>/,'
> ')
>
> Using This Regular Expression I can able to Reomve Only The First
> Occurrences of The Images,But I Need TO Remove All Occurences Of The
> Images
>
>
>
> So Any Guru Can give Me solution...

Someone has already posted a possible solution in your last thread (less
than 20 minutes before this email). I'm afraid repeating the question
ad-nauseum won't get you help any faster.

Matt

Newb Newb

8/23/2008 10:08:00 AM

0

Matt Harrison wrote:
> Newb Newb wrote:
>> ')
>>
>> Using This Regular Expression I can able to Reomve Only The First
>> Occurrences of The Images,But I Need TO Remove All Occurences Of The
>> Images
>>
>>
>>
>> So Any Guru Can give Me solution...
>
> Someone has already posted a possible solution in your last thread (less
> than 20 minutes before this email). I'm afraid repeating the question
> ad-nauseum won't get you help any faster.
>
> Matt

No I wrogly posted
Sorry
--
Posted via http://www.ruby-....