in reply to Re: Edit html files in directory
in thread Edit html files in directory

Hi, thanks for your reply, you've been a great help.

Ive noticed that the regex youve had a go at doesnt replace all instances on a line, only the first one...

e.g.
x_x(), y_y_y(), z_z()

becomes:
<a href="x_x.html">x_x()</a>, y_y_y(), z_z()

How might i change this, use a * to apply to all instances?..

s/(\w+_[_\w]+)\(\)/<A HREF="$1.html">$1\(\)<\/A>/*;

Thanks again

Replies are listed 'Best First'.
Re^3: Edit html files in directory
by clinton (Priest) on Aug 22, 2007 at 14:53 UTC
    \w includes an underscore, so your regex \w_[_\w]+ will match ___ which probably isn't what he wants.

    Clint

Re^3: Edit html files in directory
by Anonymous Monk on Aug 22, 2007 at 14:37 UTC
    Ah...use g for global after the last delimiter :)