From: Jonathan Nielsen Date: 2010-09-17T23:37:28+09:00 Subject: Re: Printing part what's found with a regex --00c09f8de2610de7e304907580df Content-Type: text/plain; charset=UTF-8 You will find that portions of the regex marked with parentheses will be places in variables called $1, $2, etc. So, you will want to change the regex to /(?!%)\w+\s+(\(\w+\))/ And then the contents of (\(\w+\)) will be placed in the variable $2. -Jonathan Nielsen --00c09f8de2610de7e304907580df--