Regex for capturing number in brackets
Posted
by neversaint
on Stack Overflow
See other posts from Stack Overflow
or by neversaint
Published on 2010-04-15T01:53:18Z
Indexed on
2010/04/15
2:03 UTC
Read the original article
Hit count: 324
I have a lines like this
NF419andZNF773 (e=10^-92,).
ZNF571 (e=2 10^-14,)
What's the regex for extracting the results above so that it gives
NF419andZNF773 - 10^-92
ZNF571 - 2 10^-14
I tried this but fail.
$line =~ /(\w+)\s\(e=\s(.*),\)/;
print "$1 - $2\n";
© Stack Overflow or respective owner