Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Perl Programming Language

text substitution

I have a text file  with many occurances of the following text:


I want to replace the (above) text with the following:

$ dev/group

But, I am having trouble when I use this code:

s/dev/group/$ dev/group

due to use of $ and /

Any tips on how I can do the replacement?



     s|(dev/group)|\$ $1|g;

Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Put a backslash in front of the meta characters that you
want to be literal:

   s/dev\/group/\$ dev\/group/;

or use single quote as the delimiter:

   s'dev/group'$ dev/group';

    Tad McClellan                          SGML consulting
    t@augustmail.com                   Perl programming
    Fort Worth, Texas

On May 23, 6:44 pm, Tad McClellan <t@augustmail.com> wrote:

That did the trick, thank you very much (to you both)!


Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc