in reply to regex and dot to star

Ok, in your regex line there's a little error, but that might be, because of memory hacking.
$html =~ s/<a href="(.*?)" group="(.*?)">(.*?)</a>/&change($1, $2, $3) +/isge; must be $html =~ s/<a href="(.*?)" group="(.*?)">(.*?)<\/a>/&change($1, $2, $3 +)/isge;
This works fine for the given line.
Maybe you could give us an example of a working and a not working input line?
----------------------------------- --the good, the bad and the physi-- -----------------------------------

Replies are listed 'Best First'.
Re: Re: regex and dot to star
by LiTinOveWeedle (Scribe) on Apr 03, 2001 at 13:22 UTC
    Yes THX,
    You are right, but syntax which I try is allright - this one is my mistake (when I wrote question). I read some new posts abour (.*?)..... What about use "^"+" instead? To closely describe what script do:

    It seems that regex take two or more hyperlink as one..... This is the part of source html code:

    <tr> <td width="11%" align="center"><a href="readcsvplus.pl?config=firm +s.pl&sort_a=id&template=5" group="1"><b><font size="2">výpis<br>spole +čností</font></b></a></td> <td width="11%" align="center"><a href="../../../../addfirm.shtml" + group="2"><b><font size="2">přidej<br>společnost</font></b></a></td> <td width="11%" align="center"><a href="cookie.pl?config=login.pl& +method=logout" group="1"><b><font size="2">logout</font></b></a></td> <td width="11%" align="center"><b><font size="2">výpis<br>zakázek< +/font></b></td> <td width="11%" align="center"><a href="../../../../addorder.shtml +"><b><font size="2">přidej<br>zakázku</font></b></a></td> <td width="11%" align="center"><b><font size="2">&nbsp;</font></b> +</td> <td width="11%" align="center"><b><font size="2">výpis<br>uživatel +ů</font></b></td> <td width="11%" align="center"><a href="../../../../adduser.shtml" + group="5"><b><font size="2">přidej<br>uživatele</font></b></a></td> <td width="12%" align="center"><b><font size="2">&nbsp;</font></b> +</td> </tr>

    this is the result:

    <tr> <td width="11%" align="center"><a href="readcsvplus.pl?config=firm +s.pl&sort_a=id&template=5"><b><font size="2">výpis<br>společností</fo +nt></b></a></td> <td width="11%" align="center"><b><font size="2">přidej<br>společn +ost</font></b></td> <td width="11%" align="center"><a href="cookie.pl?config=login.pl& +method=logout"><b><font size="2">logout</font></b></a></td> <td width="11%" align="center"><b><font size="2">výpis<br>zakázek< +/font></b></td> <td width="11%" align="center"><b><font size="2">přidej<br>uživate +le</font></b></td> <td width="12%" align="center"><b><font size="2">&nbsp;</font></b> +</td> </tr>

    Li Tin O've Weedle
    mad Tsort's philosopher