[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] pattern replacing



how do i replace a string that may have variables in it with another
string that would have reg. expressions and/or variables??  this is what
i am trying:

y/<a href="(.+)" target="_top"><img height="25" width="70"
src="(.+)hist_p\.gif" align="absmiddle" border="0" alt="(.+)"><\/a>/<img
height="25" width="70" src="$2hist_p\.gif" align="absmiddle" border="0"
alt="$3">/d;

and i also tried:

				s/<a href="(.+)" target="_top"><img height="25" width="70"
src="(.+)hist_p\.gif" align="absmiddle" border="0" alt="(.+)"><\/a>/<img
height="25" width="70" src="$2hist_p\.gif" align="absmiddle" border="0"
alt="$3">/gi;

neither worked but there must be a simpler way to do what i'm trying to
do.  can anyone help?


Rick


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org