Re: [SLUG] Need help with a sed script

From: Dylan William Hardison (dylanwh@tampabay.rr.com)
Date: Sat Aug 02 2003 - 13:27:14 EDT


On Saturday, August 02, 2003 at 11:48AM -0400, btt@nethouse.com wrote:
> $ perl -p -i'.orig' -e 's/\<\?[^\s]*(\s)/\<?php\1/g' *.php

[^\s] could be better written as \S,
< does not need to be backslashed on either side,
Using $1 instead of \1 might be better.

That star (*) might be too greedy, but I'm not sure
about that.

Good one liner, all the same. :)

--
The three laws of thermodynamics:
        (1) You can't get anything without working for it.
        (2) The most you can accomplish by working is to break even.
        (3) You can only break even at absolute zero.
-
GPG Fingerprint=D67D 2B75 53C6 9769 30E4  D390 239F C833 F32C F6F6
GPG KeyID=F32CF6F6
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:56:09 EDT