in reply to Retrieving specific word from a line of text.
To answer your question, you need to use capturing parentheses. Additionally, the leading and trailing .*s are unnecessary.
m/PNODE:(\w+)/
The part of the regex matched within the parentheses will end up in $1. See perlre for more details.
Updated: Added link to perldocs, and decided to assume that he wanted an entire word, rather than a single word character.
|
|---|