http://www.perlmonks.org?node_id=982824


in reply to Partial string match -- with a twist.

See: Capture groups

Basically, just slap some brackets around your node[0-9], and that portion of the string will be saved into the $1 variable for you to use later.