$data =~ /[^\d]+([^ ]+)[^\d]+(\d+)(.*?)$/; #### $data =~ /\D+(\S+)\D+(\d+)(.*)$/; #### $data =~ / \D+ # One or more non-digits ( # Capture to $1 \S+ # non-spaces ) \D+ # One or more non-digits ( # Capture to $2 \d+ # one or more digits ) ( # Capture to $3 .* # rest of string )$ # Anchor above to end of string /x;