I wasn't clear last time.  I wrote:
>I want to match the following:
>1) the letters "PT"
>2) a space or nothing
>3) a word that may or may not be in parentheses or even not exist
>and return item #3 (which may be null)
>Example:
>PT (XYZ) or PT XYZ or PTXYZ or PT
>should return "XYZ" except the last case, which should return "".
 
>I can do everything except the parentheses case. Any ideas?
 
The problem is the final parenthesis.  If I use (.*) or (\w*) then it
swallows the final parenthesis.  I want to discard it if it is present.
Also, the XYZ term may include spaces.
 
None of the solutions you guys sent do this.  Willing to try again?
 
Thanks again.

_______________________________________________________
Stephan Gross       Loral Skynet     908-470-2388
<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]

 

Reply via email to