No need to split and grep, just simplify your regex :)
#!/usr/bin/perl use strict; use warnings; my $names = '1Petrus2 Joh4an Smit 2johnny99 Julius 789 one 2two three3 fo44ur ..5.. six seven, seven7, eight--8--nine '; while( $names =~ /(\S*\d\S*)/g ) { print "$1\n"; }
In reply to Re^3: words with numbers in them
by tybalt89
in thread words with numbers in them
by facebook
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |