in reply to regex to return line with name but not if it has a number

As others have already stated, you've posted insufficient information for us to provide a solution. It sounds like you probably want code like this:

for my $line (@lines) { next if $line =~ /\d/; print $line if $line =~ $regex_that_is_working; }

The regex you posted (with the vague "it's not working") has a lot of potential problems:

Take a look "perlintro: Regular expressions". This has introductory information on that page; it also has many links to more detailed documentation on other pages. In addition, search for /regular expression/ on the main "perldoc - perl" page.

The "How do I post a question effectively?" page, on this site, will give you an idea of what you need to post to get better answers from us.

— Ken

Replies are listed 'Best First'.
Re^2: regex to return line with name but not if it has a number
by AnomalousMonk (Archbishop) on Apr 03, 2017 at 13:24 UTC