your version reads the first "3" characters and everything after ".c" I need to read everything until the 3rd special character before the "/"
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; my $string = '!2!ab!!!!/pack/something/whatever.cacshdska'; my ($before, $after) = $string =~ /(...)\W.*something.*\.c(.*)/; say for $before, $after;
Output is "!2!acshdska" while I need output to be "!2!ab!acshdska" sorry if I wasn't clear enough ...my bad.
In reply to Re^2: special pattern reading
by N0obieMonk
in thread special pattern reading
by N0obieMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |