On Mar 31, 2015, at 02:09, Jean-Christophe Helary 
<[email protected]> wrote:
> 
> Is there a way to do something like this:
> 
> search for (\d)
> replace by \1+1
______________________________________________________________________

Hey Jean-Christophe,

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;
}

See this page on StackOverflow for discussion.

--
Best Regards,
Chris

-- 
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].

Reply via email to