#!/usr/bin/perl # http://perlmonks.org/?node_id=1192942 use strict; use warnings; while(<DATA>) { print /(.*)/, " -> ", /\d/ ? s/(\D)(\d+)/$1 x ($2 + 1)/ger : s/(\D)\K(\1+)/ length $2 /ger; } __DATA__ raaaammmmmaaaaaj ra3m4a4j foobar really?
In reply to Re: Is there any alternative way to speed up ?
by tybalt89
in thread Is there any alternative way to speed up ?
by jnarayan81
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |