in reply to Minimizing the amount of place holders on long identical regex
But in my case this is not possible as the system that I am writing the regex does not support the split function or join it only supports C format commands syntax, so I am using Perl as a test tool before implementation.
Does the system you're on (which one - PCRE?) support search and replace?
my $sample = "041424344454647484940414"; (my $output = $sample) =~ s/.\K.//g; # alternative s/(.)./$1/g; die $output unless $output eq "012345678901";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Minimizing the amount of place holders on long identical regex
by thanos1983 (Parson) on Jun 20, 2018 at 17:19 UTC |