in reply to Minimizing the amount of place holders on long identical regex
This is not much more elegant but it does save long lines in your source.
#!/usr/bin/env perl use strict; use warnings; my $sample = "041424344454647484940414"; my $re = '([0-9])' x 24; $sample =~ /$re/; print "$1$3$5$7$9$11$13$15$17$19$21$23\n";
|
|---|
| 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:21 UTC |