D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Regular expression stupidity

 

On Mon, Oct 22, 2007 at 01:47:10PM +0100, Robin Cornelius wrote:
> I though %1 etc were substituted for the regex match but it just
> prints %1 literaly. What am i doing wrong? I want to run this on a
> whole bunch of files to fix the paths so i need to do this from the
> command line or a script.

Try either \1 or $1 (one gives a warning to use the other, but they
should both work).

-- 
Benjamin A'Lee <bma@xxxxxxxxxxxxxx>
http://subvert.org.uk/~bma/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety." - Benjamin
Franklin

Attachment: pgpFkYGFZsU5e.pgp
Description: PGP signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html