hello,
having brain freeze. let's say i have a string like this:
$this = "1234>ADS<5678##@@6787";
i want to pull out every instance of 4 digits in a row and store them somehow (array, whatever);
i must be overlooking something obvious, cause i keep trying stuff like this with no luck.
if ($this =~ m|(\d{4})|g) {
push(@ok, $1);
}
having brain freeze. let's say i have a string like this:
$this = "1234>ADS<5678##@@6787";
i want to pull out every instance of 4 digits in a row and store them somehow (array, whatever);
i must be overlooking something obvious, cause i keep trying stuff like this with no luck.
if ($this =~ m|(\d{4})|g) {
push(@ok, $1);
}