On Tue, Mar 31, 2015 at 06:13:23AM -0500, Christopher Stone wrote:
> As far as I know regex cannot be made to do that, but through the magic of
> Perl...
>
> #! /usr/bin/env perl
> use strict; use warnings;
> #----------------------------------------
>
> while (<>) {
> s/\d+/@{[$&+1]}/g;
> print;
> }
That should be:
s/(\d+)/$1 + 1/ge;
/e causes the replacement string to be executed as a Perl expression.
Ronald
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].