Re: Using 'sed' to alter file
Re: Using 'sed' to alter file
- Subject: Re: Using 'sed' to alter file
- From: Björn Lundin <email@hidden>
- Date: Thu, 6 Apr 2006 22:31:53 +0200
6 apr 2006 kl. 20.38 skrev Mark J. Reed:
<comments removed> undef $/; $_ = <>; my ($before, $changeme, $after) = /\A(.*StringA)(.*)(StringB.*)\Z/sm; $changeme =~ s/[^a-zA-Z0-9:]/-/g; $_ = $before . $changeme . $after; ($before, $changeme, $after) = /\A(.*StringC[^\(]*\()([^\)]*)(\).*)\Z/sm; $changeme =~ s/[^a-zA-Z0-9:]/-/g;
$_ = $before . $changeme . $after; print;
</comments removed>
And people find Perl hard to read/understand ;-) (I do not doubt it will work though)
/Björn
Björn Lundin bnl at spray dot se
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden