Craig Cardimon <> wrote:
> I need find the IMG tag in the line below, substituting for it the
> phrase, "IMAGE REMOVED" 
> 
> ***
> 
> <P align=center><IMG SRC="c40736033.gif" ALT="LARGE-CAP VALUE INDEX
> FUND LOGO)"></P> 
> 
> ***
> 
> Notice the unbalanced parentheses. There is no opening parenthesis to
> match the closing one. 
> 
> I have used the following pattern matching expressions in this
> attempt: 
> 
> /(<img\s+([^>]*)>)/gi
> /(<img([^>]*)>)/gi
> /(<img(.*?)>)/gi
> 
> I get the same error message every time:
> 
> Uncaught exception from user code:
>       Unmatched ) in regex; marked by <-- HERE in m/<IMG
> SRC="c40736033.gif" 
> ALT="LARGE-CAP VALUE INDEX FUND LOGO) <-- HERE ">/

The regexp that perl is complaining about doesn't look like any of the
regexps that you say you are using. In fact it looks very much like part
of your example HTML that you are trying to match. Is there something
you are not telling us?

> 
> Any hints, tips, or suggestions would be appreciated.

Tip 1: Provide a small self contained example that demonstrates the
problem. Some code that we can cut&paste&run is a lot easier to debug
that guessing what you might be doing.

Tip 2: HTML::Parser is more reliable than regexps for parsing HTML.

HTH

-- 
Brian Raven 


=================================
Atos Euronext Market Solutions Disclaimer
=================================
The information contained in this e-mail is confidential and solely for the 
intended addressee(s). Unauthorised reproduction, disclosure, modification, 
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message do not 
necessarily reflect those of Atos Euronext Market Solutions.

L'information contenue dans cet e-mail est confidentielle et uniquement 
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. 
Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail 
vous parvient par erreur, nous vous prions de bien vouloir prevenir 
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre 
systeme. Le contenu de ce message electronique ne represente pas necessairement 
la position ou le point de vue d'Atos Euronext Market Solutions.


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to