in reply to Extracting string and numbers from a file

The regex matches before a newline:
/(\w+\W+)\n/ # ~~ # ^ # | # newline

How could it return anything else?

You probably need something like

/>(\S+)/g;

I.e. match > followed by non-whitespace that gets captured.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Extracting string and numbers from a file
by shabird (Sexton) on Apr 29, 2020 at 17:26 UTC

    That helped thank you so much

      "APOL4) CYP2C8)"

      Interesting result nonetheless.